Class sap.ushell.services.ContainerModule: sap/ushell/services/Container
The Unified Shell's container which manages renderers, services, and adapters.
Since: 1.15.0.
- Since:
- 1.15.0
destroy
on the logon frame provider. - Since:
- 1.21.2
Names without a dot are interpreted as package names within the default naming convention and will be expanded to "sap.ushell.renderers." + sRendererName + ".Renderer"
. Names containing a dot are used "as is".
The resulting name must point to a SAPUI5 object which is first required and then created (constructor call without arguments). The object must be either a control (i.e. extend sap.ui.core.Control
) or a UI component (i.e. extend sap.ui.core.UIComponent
), which is then automatically wrapped into a sap.ui.core.ComponentContainer
control by this method. This sap.ui.core.ComponentContainer
is created with height
and width
set to "100%" to accommodate the complete available space.
The returned renderer is supposed to be added to a direct child (for example DIV
) of the BODY
of the page and there should be no other parts of the page consuming space outside the renderer. Use CSS class sapUShellFullHeight
at HTML
, BODY
and at the element to which the renderer is added to allow the renderer to use 100% height.
- Since:
- 1.15.0
All open UShell browser windows for the same origin are asked about their global dirty state.
- Since:
- 1.21.1
Names without a dot are interpreted as service names within the default naming convention and will be expanded to "sap.ushell.services." + sServiceName
. Names containing a dot are not yet supported. This name may be overridden via configuration. See example 2 below.
The resulting name must point to a constructor function which is first required as a SAPUI5 module and then called to create a service instance. The service will be passed to a corresponding service adapter for the current logon system, as well as a callback interface (of virtual type sap.ushell.services.ContainerInterface
) to the container providing a method createAdapter(oSystem)
to create further adapters for the same service but connected to remote systems. The third parameter will be sParameter
as passed to this function. The fourth parameter will be an object with the property config
supplied by the configuration. See example 2 below.
The adapter for the logon system will be created before the service. Its constructor gets three parameters. The first parameter is the logon system, the second parameter is sParameter
and the third parameter is an object with the property config
supplied by the configuration.
The service may declare itself adapterless by setting the property hasNoAdapter = true
at the constructor function. In this case no adapter will be created and passed to the constructor and all other parameters will be shifted.
Example 1: The service sap.ushell.services.UserInfo
is parameterless. It indicates this by setting sap.ushell.services.UserInfo.hasNoAdapter = true;
.
Example 2: (Configuration)
window["sap-ushell-config"] = { services: { Foo: { module: "my.own.Foo" config: {header: "hidden"}, adapter: { module: "my.own.FooAdapter", config: {foo: "bar"} } } } } oService = sap.ushell.Container.getService("Foo", "runtimeConfig");Now
oService
is an instance of my.own.Foo
. The third parameter of the constructor will be "runtimeConfig", the fourth parameter {config: {header: "hidden"}}
. Its adapter is an instance of my.own.FooAdapter
constructed with the parameters logon system, "runtimeConfig" and {config: {foo: "bar"}}
. - Since:
- 1.15.0
- Since:
- 1.15.0
Use Function.prototype.bind()
to determine the callback's this
or some of its arguments.
- Since:
- 1.31.0
Default value is false
- Since:
- 1.27.0
- Default Value:
- false
A logon frame provider is used to facilitate user authentication even for requests sent via XMLHttpRequest
. It is called back in order to create a hidden IFRAME
, to show it to the user, then to hide and destroy it. The frame must be treated as a black box by the provider; especially with respect to the source of the frame which is managed by the Unified Shell framework. Showing the frame might require user interaction and some decoration around the frame. The frame should be destroyed, not reused, to be on the safe side. Note that in typical cases with SAML2, authentication happens automatically and the frame can stay hidden.
The following order of method calls is guaranteed:
- The
create
method is called first. - The
show
method may be called next (if there is HTML code to display). - The
destroy
method is called last. - A new cycle may start for a new logon process.
- Since:
- 1.21.2