Creates a new NavigationHandler class by providing the required environment.
The NavigationHandler
supports the verification of sensitive information. All properties that are part of selectionVariant
and valueTexts
will be verified if they are annotated as com.sap.vocabularies.PersonalData.v1.IsPotentiallySensitive
or com.sap.vocabularies.UI.v1.ExcludeFromNavigationContext
and will be removed before the data is persisted as the app state.
Also, all properties annotated as com.sap.vocabularies.Analytics.v1.Measure
will be removed from the data stored as the xapp state.
To verify the information to be removed, the NavigationHandler
requires an unnamed model of type sap.ui.model.odata.v2.ODataModel on component level. It is possible to set such a model using the setModel
method.
Note: The check for excluded data requires that the OData metadata has already been loaded completely.
If the OData metadata model has not been loaded completely, all properties are removed from the application context.
Note: This class requires that the UShell sap.ushell.services.CrossApplicationNavigation is available and initialized.
new sap.ui.generic.app.navigation.service.NavigationHandler(oController, sParamHandlingMode?)
Param | Type | Default Value | Description |
---|---|---|---|
oController | object | UI5 controller that contains a router and a component; typically the main controller of your application, for example, a subclass of the sap.ca.scfld.md.controller.BaseFullscreenController if scaffolding is used |
|
sParamHandlingMode? | string | SelVarWins | Mode to be used to handle conflicts when merging URL parameters and the SelectionVariant class, see sap.ui.generic.app.navigation.service.ParamHandlingMode |
Method | Description |
---|---|
sap.ui.generic.app.navigation.service.NavigationHandler.constructContextUrl |
The method creates a context url based on provided data. This context url can either be used as ParameterContextUrl or FilterContextUrl |
sap.ui.generic.app.navigation.service.NavigationHandler.extend |
Creates a new subclass of class sap.ui.generic.app.navigation.service.NavigationHandler with name
|
sap.ui.generic.app.navigation.service.NavigationHandler.getMetadata |
Returns a metadata object for class sap.ui.generic.app.navigation.service.NavigationHandler. |
sap.ui.generic.app.navigation.service.NavigationHandler.getTechnicalParameters |
Gets the application specific technical parameters. Technical parameters will not be added to the selection variant passed to the application. As a default the following values are considered as technical parameters:
|
sap.ui.generic.app.navigation.service.NavigationHandler.mixAttributesAndSelectionVariant |
Combines the given parameters and selection variant into a new selection variant containing properties from both, with the parameters overriding existing properties in the selection variant. The new selection variant does not contain any parameters. All parameters are merged into select options. The output of this function, converted to a JSON string, can be used for the NavigationHandler.navigate method. |
sap.ui.generic.app.navigation.service.NavigationHandler.navigate |
Triggers a cross-app navigation after saving the inner and the cross-app states. Since 1.52.0 the navigation mode based on
Since 1.83.0 <br> <b>Node:</b> If the <code>oExternalAppData</code> parameter is not supplied, the external app data will be calculated based on the <code>oInnerAppData</code> data.<br> SmartFilterBar control <b>Parameters:</b> <table> <tr> <td align="center">{object}</td> <td><b>oError</b></td> <td>Error object (instance of {@link sap.ui.generic.app.navigation.service.NavError}) that describes which kind of error occurred</td> <tr> <td align="center">{string}</td> <td><b>oError.errorCode</b></td> <td>Code to identify the error</td> <tr> <td align="center">{string}</td> <td><b>oError.type</b></td> <td>Severity of the error (info/warning/error)</td> <tr> <td align="center">{array}</td> <td><b>oError.params</b></td> <td>An array of objects (typically strings) that describe additional value parameters required for generating the message</td> </table>
|
sap.ui.generic.app.navigation.service.NavigationHandler.parseNavigation |
Parses the incoming URL and returns a Promise. If this method detects a back navigation, the inner app state is returned in the resolved Promise. Otherwise startup parameters will be merged into the app state provided by cross app navigation, and a combined app state will be returned. The conflict resolution can be influenced with sParamHandlingMode defined in the constructor. |
sap.ui.generic.app.navigation.service.NavigationHandler.processBeforeSmartLinkPopoverOpens |
Processes navigation-related tasks related to beforePopoverOpens event handling for the SmartLink control and returns a Promise object. In particular, the following tasks are performed before the SmartLink popover can be opened:
Since 1.83.0 <br> <b>Node:</b> If the <code>oExternalAppData</code> parameter is not supplied, the external app data will be calculated based on the <code>mInnerAppData</code> data.<br>
|
sap.ui.generic.app.navigation.service.NavigationHandler.replaceHash |
Changes the URL according to the current sAppStateKey. As an reaction route change event will be triggered. |
sap.ui.generic.app.navigation.service.NavigationHandler.setModel |
Sets the model that is used for verification of sensitive information. If the model is not set, the unnamed component model is used for the verification of sensitive information. |
sap.ui.generic.app.navigation.service.NavigationHandler.setTechnicalParameters |
Sets the application specific technical parameters. Technical parameters will not be added to the selection variant passed to the application. As a default the following values are considered as technical parameters:
|
sap.ui.generic.app.navigation.service.NavigationHandler.storeInnerAppState |
Changes the URL according to the current app state and stores the app state for later retrieval. |
sap.ui.generic.app.navigation.service.NavigationHandler.storeInnerAppStateWithImmediateReturn |
Changes the URL according to the current app state and stores the app state for later retrieval. |