Class sap.ushell.services.AppLifeCycleModule: sap/ushell/services/AppLifeCycle
Since: 1.38.
Constructor Summary
new sap.ushell.services.AppLifeCycle(oAdapter, oContainerInterface, sParameter, oConfig)The Unified Shell's AppLifeCycle service This method MUST be called by the Unified Shell's container only, others MUST call
sap.ushell.Container.getService("AppLifeCycle").Method Summary
Constructor Detail
new sap.ushell.services.AppLifeCycle(oAdapter, oContainerInterface, sParameter, oConfig)
The Unified Shell's AppLifeCycle service This method MUST be called by the Unified Shell's container only, others MUST call
sap.ushell.Container.getService("AppLifeCycle"). Constructs a new instance of the AppLifeCycle service. Parameters:
| {object} | oAdapter | The service adapter for the AppLifeCycle service, as already provided by the container |
| {object} | oContainerInterface | interface |
| {string} | sParameter | Service instantiation |
| {object} | oConfig | service configuration (not in use) |
Method Detail
attachAppLoaded(oData, fnFunction, oListener)
Attaches an event handler for the appLoaded event. This event handler will be triggered each time an application has been loaded.
Parameters:
| {object} | oData | An object that will be passed to the handler along with the event object when the event is fired. |
| {function} | fnFunction | The handler function to call when the event occurs. |
| {object} | oListener | The object that wants to be notified when the event occurs (this context within the handler function). |
- Since:
- 1.38
detachAppLoaded(fnFunction, oListener)
Detaches an event handler from the EventProvider.
Parameters:
| {function} | fnFunction | The handler function that has to be detached from the EventProvider. |
| {object} | oListener | The object that wanted to be notified when the event occurred |
- Since:
- 1.38
getCurrentApplication(): object
Get information about the currently running application. The function returns an object with following parameters: - applicationType: “UI5|WDA|NWBC|URL|GUI” - componentInstance: reference to component (only for type SAPUI5) - homePage: true is Shell-home is currently displayed
- Since:
- 1.38
Returns:
| {object} | the currently alive application component or undefined if no component alive |