For each configuration option, you can have one attribute in the bootstrap script tag to provide SAPUI5 runtime configuration.
The attributes have to provide the following information:
Attribute name
The attribute name is composed of the name of the configuration option and the data-sap-ui- prefix. The first part of the prefix (data-) is necessary to comply with the W3C recommendations for custom attributes in HTML. The second part (-sap-ui-) separates SAPUI5 attributes from custom attributes defined by any other framework.
Attribute names in HTML are case-insensitive and this also applies to the configuration attribute names. However, SAPUI5 has defined some configuration options names in camel case, for example originInfo. SAPUI5 converts these names automatically to lower case when accessing the configuration.
Value
Element attributes in HTML have a string value by definition. For configuration options of type string, the attribute value is equivalent to the value of the option.
If the value contains specific HTML characters, such as '<' or '>', or if the value contains the same quote character that is used to wrap the attribute value, the usual HTML escape mechanisms must be used: Use entities for the specific HTML characters, for example < instead of <, and switch the type of quotes from single to double or vice versa.
For configuration options that are not of type string, the format of the allowed values has to be defined as follows:
Type | Notation/Values |
---|---|
string | Just a string, but escaped according to the HTML conventions |
boolean | 'true' and 'x' are both accepted as true values (case-insensitive), all others are false. We recommend to use 'false' for false values |
int | Any integer value |
string array | Comma separated list of values; comma is not supported in the values (no escaping) |
map from string to string | JavaScript object literal (preferably JSON syntax) |