EbsRouter
(FintechOS Studio 21.1.3 and later)
Starting with release 21.1.3, an alternative Single Page Application mode is available for FintechOS Portal. This mode enables URLs that do not expose information such as the journey name, form step, record ID, etc. in the browser's address bar. Instead, only one of the following location hashes is displayed in the FintechOS Portal address bar:
- <Portal Instance>#/userjourney
- <Portal Instance>#/entityform
- <Portal Instance>#/customform
The identification of the currently displayed page is handled separately, through state management, and is not visible in the browser's address bar. This way, the page that is shown on screen (the state) is independent from the URL displayed in the browser's address bar (the route).
The Single Page Application mode is controlled via the sys-single-page-app-router system parameter. When this parameter is enabled, you can also use the sys-compatibility-url-params-router system parameter to support both the single-page mode and legacy URLs at the same time.
The EbsRouter object implements methods that facilitate navigation when FintechOS Portal is in the Single Page Application mode, replacing functions such as ebs.goToUrl, ebs.getEditNavigationUrl, ebs.getInsertNavigationUrl, or ebs.getListNavigationUrl.
| Method | Description |
|---|---|
| EbsRouter.getActiveHash | Returns the location hash of the current page. |
| EbsRouter.getState | Retrieves the identification information of the currently displayed page. |
| EbsRouter.parseUrl | Extracts the state of a page from a legacy URL. |
| EbsRouter.callRoute | Changes the route and navigates to the specified page. |
| EbsRouter.replaceRoute | Changes the route and navigates to the specified page without saving it into the browser's history. |
| EbsRouter.continueRoute | Maintains the current route and navigates to the specified page. |
| ebs.goToRoute | Maintains the current route and navigates to the specified page with or without saving it in the browser's history. |
| EbsRouter.registerHookOnRouteExit | Executes a callback function when the route changes. |