File Index
shell.js
An API which allows applications to talk to a surrounding shell.
Note: Including this file automatically performs domain relaxation.
Since version 1.26.3, the way how domain relaxation is performed can be
configured by setting the property domainRelaxation in the global variable
sap-ui2-shell-api-config before including the script. The property
domainRelaxation has to be an object with the following properties:
integrated: domain relaxation used, when application is started inside of an iframe, a frameset or a popup windowstandalone: domain relaxation used, when application runs standalonemaxrelaxmaximal relaxation, for "auto" and "maximal"
Possible values for integrated/standalone:
"none": No domain relaxation will be done"auto": Domain relaxation will automatically adapt to the parent window. If no matching relaxation can be found, domain relaxation is "maximal". When running standalone this defaults to "minimal"."minimal": Only the first part (hostname) of the domain will be removed"maximal": Remove as much as possible, without relaxing to the top-level domain
Possible value for maxrelax: Integer, that determines the number of domain parts, that have to be kept. E.g. 2 means "sap.com", 3 means "sub.sap.com"
Example:
window["sap-ui2-shell-api-config"] = {
domainRelaxation : {
integrated : "auto",
standalone : "none",
maxrelax : 2
}
}
The default behavior is:
- integrated: "auto"
- standalone: "minimal"
- maxrelax: 2
Note: Including this file automatically transports the user's settings from an ABAP backend to SAPUI5, e.g. preferred language incl. its right-to-left status, date, time, and number formats, theme and possibly others (in future). For this to take proper effect, this file must be included before the SAPUI5 bootstrap. Beware! This has an effect on SAPUI5's bootstrap sequence with two known consequences:
- You must not refer to SAPUI5 code other than
sap.ui.getCore().attachInit()until SAPUI5's core is properly initialized. - You cannot include style sheets directly from the HTML page and override SAPUI5 style
classes in them, because SAPUI5's bootstrap is delayed and their standard style sheets are
included only after the page has loaded completely. Use
jQuery.sap.includeStyleSheet()from your code and obey the first rule. Override SAPUI5 style classes with caution! Be sure not to break the built-in theming support, e.g. by hard-coding custom colors.