Class sap.ushell.services.NavTargetResolutionModule: sap/ushell/services/NavTargetResolution
The Unified Shell's internal navigation target resolution service
Methods in this class deal with *internal* representations of the shell hash.
configurations: config : { allowTestUrlComponentConfig : true }
allow to redefine the Test-url, Test-local1, Test-local2 applications via url parameters (sap-ushell-test-local1-url= / sap-ushell-test-local1-additionalInformation= ... )
Since: 1.15.0.
sap.ushell.Container.getService("NavTargetResolution")
.This function gets the hash part of the URL and expands a sap-intent-param if present and retrievable
This is an asynchronous operation.
sap.ushell.Container.getService("NavTargetResolution")
. Constructs a new instance of the navigation target resolution service. {oServiceConfiguration} | a | Service configuration |
This function gets the hash part of the URL and expands a sap-intent-param if present and retrievable
This is an asynchronous operation.
{string} | sHashFragment | The formatted URL hash fragment in internal format(as obtained by the SAPUI5 hasher service, not as given in location.hash ) |
{string} | A jQuery.Promise. Its done() function gets an expanded shell hash (in internal format) |
This is effectively a test function for toExternal/ hrefForExternal. It is functionally equivalent to isIntentSupported but accepts the same input as toExternal/ hrefForExternal.
{object[]} | aIntents | the intents (such as ["#AnObject-action?A=B&c=e"] ) to be checked with object beeing instances the oArgs object of toExternal, hrefForExternal etc. e.g. |
- Since:
- 1.32
{object} | A jQuery.Deferred object's promise which is resolved with an array (!) of objects representing whether the intent is supported or not objects with a property supported of type boolean .representing Example: aIntents: an array of parameterized (parsed) Intent objects, in the corresponding structure to arguments to sap.ushell.services.CrossApplicationNavigation.toExternal, sap.ushell.services.CrossApplicationNavigation.hrefForExternal [ { target : { semanticObject : "AnObject", action: "action" }, params : { P1 : "B", P2 : [ "V2a", "V2b"] } }, { target : { semanticObject : "SalesOrder", action: "display" }, params : { P3 : "B", SalesOrderIds : [ "4711", "472"] } } ] The following formats are also supported as input: response: [ { supported: false }, { supported: true } ]Example usage: this.oCrossAppNav.isNavigationSupported([ ]) .done(function(aResponses) { if (oResponse[0].supported===true){ // enable link } else { // disable link } }) .fail(function() { // disable link // request failed or other fatal error }); |
This function should be used by a custom renderer in order to implement custom navigation. Do not use this function for developing Fiori applications.
This function gets the hash part of the URL and returns data of the target application.
Example of the returned data:
{ "additionalInformation": "SAPUI5.Component=sap.ushell.renderers.fiori2.search.container", "applicationType": "URL", "url": "/sap/bc/ui5_ui5/ui2/ushell/resources/sap/ushell/renderers/fiori2/search/container", "navigationMode": "embedded" }
This is an asynchronous operation.
{string} | sHashFragment | The formatted URL hash fragment in internal format (as obtained by the SAPUI5 hasher service) not as given in location.hash )! example #SemanticObject-action?P1=V1&P2=A%20B%20C |
{object} | A jQuery.Promise. Its done() function gets an object that you can use to create a sap.ushell.components.container.ApplicationContainer or undefined in case the hash fragment was empty. Typically it contains the following information: { "applicationType": "URL", "url": "/sap/bc/", "additionalInformation": "SAPUI5.Component=com.sap.AComponent", "text": "My targetmapping description", "navigationMode": "embedded" } The No navigation should occur when the promise is resolved to |