Skip to content

Latest commit

 

History

History
1480 lines (895 loc) · 35 KB

Configuration_Options_and_URL_Parameters_91f2d03.md

File metadata and controls

1480 lines (895 loc) · 35 KB
loio
91f2d03b6f4d1014b6dd926db0e91070

Configuration Options and URL Parameters

The following tables show available configuration options.

Note:

In earlier framework versions, the configuration options available in OpenUI5 could be found in the API Reference via the sap.ui.core.Configuration. This legacy module has been deprecated with OpenUI5 1.120 and replaced by a modular, future-proof solution for configuration handling.

Note:

The OpenUI5 configuration options now follow a consistent naming scheme based on kebab-case notation. Configuration options in older framework versions or code samples (especially those from before OpenUI5 1.120) may follow the former camelCase notation. Typically, you should now use (or search for) the newer names, e.g. log-level instead of logLevel.

The available configuration options are given below the topic they belong to, e.g. Localization, Theming, etc. Often, these topics correspond to modules with the same name, which provide methods to retrieve and set the values of their associated configuration options.

Some configuration options can also be set via URL parameters, which is indicated by an entry in the corresponding column in the tables below. URL parameter names are composed of the sap-ui- prefix together with the name of the configuration option, for example: sap-ui-log-level=ALL. An application may set the ignore-url-parameters option to true to disable configuration URL parameters.

Typically, configuration options are evaluated when booting OpenUI5. After that, all changes to these options are ignored. For some configuration options, specific APIs exist that allow you to modify their values at runtime. This is indicated by an entry in the corresponding column in the tables below, which usually also provides a link to the respective API method.


Option

Description

by URL parameter

by API

active-terminologies

Type: string[]

Default value: undefined

List of active terminologies provided via URL parameter, bootstrap or sap.ui.core.Component.create API.

YES

NO

language

Type: string

Default value: user settings / language

Defines the language that shall be used for localized texts, formatting, and so on. For more information, see Identifying the Language Code / Locale.

YES

YES

Localization.setLanguage

rtl

Type: boolean

Default value: RTL derived from user locale

If set to true, all controls are rendered in right-to-left (RTL) mode.

Typically, the RTL mode is derived from the current language, which is usually picked automatically based on the locale configuration of the user's browser or profile data. Particularly for testing purposes, it might be handy to set the mode explicitly.

Modifiable at runtime with restrictions. For more information, see the API Reference: Localization.setLanguage .

YES

YES

Localization.setRTL

timezone

Type: string

Default value: the browser's local time zone

The configured time zone is used for sap.ui.core.date.UI5Date instances and to convert dates when using sap.ui.core.format.DateFormat instances. The time zone should be an IANA time zone ID, e.g. "America/New_York". In addition to the sap-ui-timezone URL parameter, an alternative sap-timezone parameter can also be used to set the time zone.

For more information, see Date Format.

Caution:

Setting the time zone via the configuration API has to be done at the earliest possible point in time when launching an OpenUI5 application. It is preferably even set by shells or launchpads, such as the SAP Fiori launchpad, before launching the application. Using the API in running applications can lead to unexpected data inconsistencies, because any created date objects could still be related to the previously configured time zone. Generally, an app should be completely restarted after changing the time zone.

The OpenUI5 configuration is applied globally and not application-specific; it therefore affects all apps inside the shell or launchpad, for example.

YES

YES

Localization.setTimezone


Option

Description

by URL parameter

by API

calendar-type

Type: sap/base/18n/date/CalendarType

Default value: If there is no value defined, the actual value is determined from the locale data for the configured locale.

Defines the calendar type that is used for locale-dependent, date-related features (for example, formatting or parsing date and time).

YES

YES

Formatting.setCalendarType

calendar-week-numbering

Type: sap/base/18n/date/CalendarWeekNumbering

Default value: Default

Defines the calendar week numbering algorithm that is used to determine the first day of the week and the first calendar week of the year.

For more information, see the API Reference: sap/base/18n/date/CalendarWeekNumbering

YES

YES

Formatting.setCalendarWeekNumbering

format-locale

Type: string

Default value: Derived from the language

Defines the locale used for formatting purposes; the default values for the locale are derived from the language.

YES

YES

Formatting.setLanguageTag

trailing-currency-code

Type: boolean

Default value: true

By default the currency codes are shown after the amount. If set to false, the currency code will be shown as configured by the locale-specific patterns of the Common Locale Data Repository (CLDR).

YES

YES

Formatting.setTrailingCurrencyCode

ABAP-date-format

Type: string

Default value: ''

Specifies one of the ABAP date formats.

YES

YES

Formatting.setABAPDateFormat

ABAP-time-format

Type: string

Default value: ''

Specifies one of the ABAP time formats.

YES

YES

Formatting.setABAPTimeFormat

ABAP-number-format

Type: string

Default value: ''

Specifies one of the ABAP number formats.

YES

YES

Formatting.setABAPNumberFormat


Option

Description

by URL parameter

by API

theme

Type: string

Default value: The default theme of the used UI5 version

Defines the theme that shall be used.

Theme Root: When the theme string contains an at-sign (@), anything before the @ is assumed to denote the ID of the theme, while anything after the @ is assumed to represent the URL location of the theme. To defend against XSS attacks, only origins maintained in sap-allowed-theme-origins are accepted. For more information, see Theme Origin Allowlist.

YES

YES

Theming.setTheme

theme-roots

Type: {}

Default value: undefined

Defines the location of themes.

NO

NO

preload-lib-css

Type: string[]

Default value: {}

Specifies a list of UI libraries using the same syntax as the libs property, for which the OpenUI5 core does not include the library.css stylesheet in the head of the page. If the list starts with an exclamation mark (!), no stylesheet is loaded at all for the specified libs. In this case, it is assumed that the application takes care of loading CSS, for example, a manually merged, single CSS file. Otherwise, the framework instructs the back end to create a merged CSS for the specified libs. In both cases, if the first libraries name is an asterisk (*), it will be expanded to the list of already configured libraries.

YES

NO

versioned-lib-css

Type: boolean

Default value: false

If set to true, the version parameters are included in requests to the library theme resource (for example, the parameter library.css?version=1.0.1&sap-ui-dist-version=1.0.2 is added. version contains the library version and sap-ui-dist-version the version of the OpenUI5 distribution .

This applies to the following resources:

  • library(-RTL).css (or any other variation)

  • library-parameters.json

URLs within the CSS or parameters are not modified.

YES

NO


Option

Description

by URL parameter

by API

accessibility

Type: boolean

Default value: true

If set to true, the OpenUI5 controls are rendered for or running in accessibility mode.

YES

NO

animation-mode

Type: sap/ui/core/AnimationMode

Default value: full

Sets the animation behavior according to the values and description provided by the AnimationMode enumeration, e.g. full, basic, minimal or none.

YES

YES

ControlBehavior.setAnimationMode

uid-prefix

Type: string

Default value: '__' (i.e. two underscore characters)

Prefix to be used for automatically generated control IDs; must be chosen carefully to avoid conflicts with IDs defined by the application or DOM IDs.

NO

NO


Option

Description

by URL parameter

by API

allowlist-service

Type: string

Default value: ""

URL to an allowlist service; see Allowlist Service.

NO

NO

frame-options

Type: string

Default value: allow

Frame options mode; for more information, see Frame Options.

NO

NO

frame-options-config

Type: {}

Default value: undefined

Advanced frame options configuration; for more information, see Frame Options.

security-token-handlers

Type: []

Each of these functions is called by the OData V4 model to retrieve the security tokens instead of using the default "X-CSRF-Token".

For more information, see Security Token Handling.

NO

YES

Security.setSecurityTokenHandlers


Option

Description

by URL parameter

by API

debug

Type: boolean | string

Default value: false

If set to true, the debug sources are loaded; if the bootstrap code is loaded from an optimized source, the bootstrap will be aborted and start anew from a debug source.

You can also specify a comma-separated list as a string that contains all modules that should be loaded as debug source.

Example: index.html?sap-ui-debug=sap/ui/model/odata/v2/ will load all debug sources for all modules of the OData V2 model. All others modules will be taken from the preload (if preload is active).

You can use the following patterns:

  • A trailing slash (/) means that the complete package should be included (shortcut for /**/*)

    Example: sap/ui/model/odata/v2/ loads everything from the sap/ui/model/odata/v2/ package as debug source (also nested packages sap/ui/model/odata/v2/**/*).

  • **/ matches any package or sequence of packages

    Example: **/v2/ loads any package named v2 as debug sources like odata/v2, json/v2/ etc.

  • * matches any part of a simple name

    Example: sap/ui/model/* matches all files directly contained in the model package, but not in nested packages (for example, not v2 or v4)

Note:

You can also select the debug sources in the Technical Information Dialog. For more information, see Technical Information Dialog.

YES

NO

ignore-url-params

Type: boolean

Default value: false

Security-relevant parameter that allows applications to disable configuration modifications via URL parameters.

NO

NO

inspect

Type: boolean

Default value: false

If set to true, the sap-ui-debug.js module is included and provides some supportability features.

YES

NO

log-level

Type: string

Default value: ERROR

This configuration parameter sets the log level to the given value; for minified (productive) sources, the default level is ERROR, for debug sources it is DEBUG. At runtime, you can modify the log level by using the sap/base/Log.setLevel method.

Options: 0|1|2|3|4|5|6|NONE|FATAL|ERROR|WARNING|INFO|DEBUG|ALL

YES

YES

Log.setLevel

statistics

Type: boolean

Default value: false

Activates end-to-end traces and measurement of response times For more information, see Interaction Tracking for Performance Measurement.

YES

NO

support

Type: string[]

Default value: null

Whether support mode is enabled. For more information, see Support Assistant.

Options: true | silent | window

YES

NO

test-recorder

Type: string[]

Default value: null

Whether test tools are enabled. For more information, see Test Recorder.

Options: true | silent | window

YES

NO


Option

Description

by URL parameter

by API

app-cache-buster

Type: string[]

Default value: []

Modifiable at runtime via the AppCacheBuster API (see Application Cache Buster: Enhanced Concept).

If set to a non-empty list of URLs, the AppCacheBuster will be activated and will load component version info files from the configured set of URLs (see Application Cache Buster).

YES

YES

async

Type: boolean

Default value: false

This configuration setting enables the module loader to load both modules and library-preload files asynchronously. Activating this feature requires intensive application-side cooperation and testing to ensure a stable and fully working application. In case you encounter issues, or if you want to prepare your application in advance, see Is Your Application Ready for Asynchronous Loading?

YES

NO

compat-version

Type: string

Default value: 1.14

Note:

Applications must set this option to edge. Other version definitions are deprecated.

For more information, see Compatibility Version Information.

NO

NO

excludejquerycompat

Type: boolean

Default value: false

A compatibility layer restores several incompatibly changed APIs in jQuery v3 back to their old behavior in jQuery v2. It may be excluded via this setting. For more information, see Upgrading from a Version Below 1.82.

YES

NO

libs

Type: string[]

Default value: []

Defines a list of libraries that shall be loaded initially.

To load further libraries, the Lib.load() method may be used. For more information, see: Lib.load

All libraries provided using the configuration option libs are merged into the configuration option modules.

NO

YES

modules

Type: string[]

Default value: []

Defines a list of JavaScript modules that shall be loaded after the core has been initialized.

NO

NO

no-conflict

Type: boolean

Default value: false

If set to true, OpenUI5 forces jQuery into noConflict mode.

NO

NO

on-init

Type: string|function

Default value: undefined

Defines code that has to be executed after the initialization.

In case a string is provided, this must be either the name of a module indicated by the prefix module: (like module:sap/ui/core/ComponentSupport) or the name of a property within the globalThis object containing a function. The provided module will be loaded and executed after initialization.

Within globalThis["sap-ui-config"]["on-init"] it is also possible to provide a function directly.

Caution:

For productive scenarios, only the usage of a module is supported. Functions or function references to the globalThis object are only intended to be used within non-productive scenarios, such as testing, web-based debugging, or sharing minimal samples.

Deprecation: As of UI5 1.120, only module names should be provided for productive scenarios. Only for non-productive scenarios, references to functions available on the globalThis object might also be used.

NO

YES

resource-roots

Type: object

Default value: undefined

With sap.ui.loader.config({paths: ...}) a map can be used to define locations for resources. See the API Reference: sap.ui.loader

To provide a URL location that is not overwritten by a component later on, final can be set to true, for example: {url: '/that/is/the/prefix/', final: true}

For more information, see the API Reference: sap.ui.loader.config

NO

YES


The table below lists the possible types for configuration options and their corresponding valid values.

Note:

Some of the configuration options listed on this page, as well as the ones listed under Deprecated Configuration Options, might have more restrictions on the allowed values. Please refer to the corresponding entry for more details.

Type

Valid Values

Boolean

true|false

Integer

Any valid integer value

String

Any valid string value

StringArray

An empty array [], an array containing one or more valid strings, e.g. ["<string1>", "<string2>", "<stringN>"], or a string with a list of values separated by comma or semicolon, e.g. "<string1>, <string2>, <stringN>".

Note:

For sources where the values can only be provided via a string such as a bootstrap tag, meta tag or URL, you'd need to provide values of type StringArray as a comma- or semicolon-separated list.

FunctionArray

An empty array [] or an array containing one or more functions, e.g. [myFunction1, myFunction2, myFunctionN]

Function

A valid function object

Object

A valid JavaScript object

Enumeration

Any value which is part of the respective enumeration for the corresponding configuration parameter. For instance, the animation-mode parameter can take any value of the sap/ui/core/AnimationMode enumeration, such as AnimationMode.basic, AnimationMode.full, AnimationMode.minimal, or AnimationMode.none.


For alist of deprecated configuration options, see Deprecated Configuration Options.