One of the most common use cases for plug-ins is to add user interface elements to the SAP Fiori launchpad. This example shows how to implement such a plug-in.
The SAP Fiori launchpad renderer provides an API which can be used for adding UI elements. This example focuses on a single extension possibility. For information on extending the SAP Fiori launchpad renderer, see the JSDocs in the SAPUI5 demo kit at http://<host>:<port>/sap/public/bc/ui5_demokit/#docs/api/symbols/sap.ushell.renderers.fiori2.Renderer.html.
The launchpad does not guarantee any order when plug-ins are loaded and initialized. Therefore, a UI plug-in has to register on an SAPUI5 event before it can get the shell renderer from the container.
The UI extension API is specific to the "fiori2" shell renderer implementation, which is the standard renderer for SAP Fiori launchpad.
The number of icons that you can display in the shell header is restricted. For more information, see SAPUI5 Demo Kit: Controls (also addHeaderEndItem).
For configuring the plug-in, create a target mapping with the configuration below, then assign the catalog to a role.
Field |
Value |
---|---|
Semantic Object |
Shell |
Action |
plugin |
Application Type |
SAPUI5 Fiori App |
Title |
UI Plug-in Test |
URL |
sap/bc/ui5_demokit/test-resources/sap/ushell/demoapps/UIPluginSample |
Component |
sap.ushell.demo.UIPluginSampleAddHeaderItems |
Information |
|
Device Types |
All device types must be selected. |
Parameters |
Specifiy configuration parameters as shown in the table below. |
Name |
Default Value |
---|---|
position |
begin |
icon |
globe |
message |
Hello |