You can define an alternative route from where to load SAPUI5 flexibility.
If you want SAPUI5 flexibility to be loaded from the default location as part of the SAPUI5 bootstrap, you don't need to do anything.
If you have a specific use case, you can change the default behavior using the flexibilityServices parameter in the SAPUI5 bootstrap. For example, if you'd like to disable SAPUI5 flexibility during SAPUI5 bootstrap, set the value of the flexibilityServices parameter to an empty string. Here's an example
<script id="sap-ui-bootstrap" src="resources/sap-ui-core.js" data-sap-ui-async="true" data-sap-ui-flexibility-services="" data-...="..."> </script>
For various use cases, you can also define a list of connectors within flexibilityServices. These connectors are targeted at a specific use case and can be combined.
You provide the list of connectors as a string, because flexibilityServices is a string as well. Example: flexibilityServices ='[{"connector": "SessionStorageConnector"}]'.
The connectors control the layers to which changes are written. Every connector has a default layering configuration, but you can limit this default by specifying certain layers. Example: As a result of the following string, only the SessionStorage connector is used for CUSTOMER layer content (see Layering Concept):
flexibilityServices ='[{"connector": "SessionStorageConnector", layers: ["CUSTOMER"]}]'
|
Name |
Supported Layers |
Description |
|---|---|---|
|
|
|
Used to connect key user adaptation, shared views, and end-user personalization on SAP BTP, Cloud Foundry environment. For more information, see Developing Applications Running Standalone. |
|
|
|
Used to connect key user adaptation and shared views on SAP BTP, Cloud Foundry environment. For more information, see Developing Applications Running in the SAP Cloud Portal Service. |
|
Name |
Supported Layers |
Description |
|---|---|---|
|
|
|
Default connector used to handle ABAP back-end systems as well as SAP BTP, Neo environment |
|
|
|
Used to connect personalization within an SAPUI5 application on SAP BTP, Cloud Foundry environment |
To apply the mocked data correctly, you need a dependency to the
sap.ui.fllibrary. You can establish this through dependencies within the used libraries or via the applications manifest.Alternatively, add
sap.ui.flto the bootstrap of the test setup:data-sap-ui-libs = '…,sap.ui.fl'
|
Name |
Supported Layers |
Description |
|---|---|---|
|
|
All |
Used to store all entries within the local storage of the browser.
|
|
|
All |
Used to store all entries within the session storage of the browser.
Example: If you want to verify that a user can add additional files, the configuration should look like this: |
|
|
All |
Used to store all entries within a JSON object persisting only for the session.
|
|
|
None |
Used to load mocked back-end responses. It needs an additional parameter The mocked file contains the data as JSON with the following structure: {
changes: [<list of changes as JSON>],
compVariants: [<list of filters for comp controls as JSON>]
}
Example: If you want to verify that a mocked back-end system provides data, the configuration should look like this: |
Example:
If you want to verify both, that a mocked back-end system provides data and a user can add additional files, the configuration should look like this:
data-sap-ui-flexibility-services = '[{"connector": "ObjectPathConnector", "path": "/some/path/to/the/mocked/data.json"},{"connector": "SessionStorageConnector"}]'
There are additional connectors for internal usage or super classes which must not be used within a configuration.
Related Information