Class sap.ushell.renderers.fiori2.RendererModule: sap/ushell/renderers/fiori2/Renderer
The SAPUI5 component of SAP Fiori Launchpad renderer for the Unified Shell.
Since: 1.15.0.
sap.ushell.Container.createRenderer("fiori2")
.sClassName
and enriches it with the information contained in oClassInfo
.and handling of User Preferences actions such as SAVE and CANCEL.
(see sap.ushell.renderers.fiori2.renderer.LaunchpadState).
sClassName
and enriches it with the information contained in oClassInfo
. oClassInfo
might contain the same kind of information as described in sap.ui.core.UIComponent.extend.
{string} | sClassName | Name of the class being created |
{object} | oClassInfo? | Object literal with information about the class |
{function} | FNMetaImpl? | Constructor function for the metadata object; if not given, it defaults to sap.ui.core.ElementMetadata |
{function} | Created class / constructor function |
{sap.ui.base.Metadata} | Metadata object describing this class |
sap.ushell.Container.getRenderer("fiori2").addActionButton("sap.m.Button", {id: "testBtn2", text: "test button"}, true, true);
{string} | controlType | The (class) name of the control type to create. |
{object} | oControlProperties | The properties that will be passed to the created control. |
{boolean} | bIsVisible | Specify whether to display the control |
{boolean} | bCurrentState | If true, add the current control only to the current rendered shell state. Once the user navigates to another app or back to the Home page, this control will be removed. |
{String[]} | aStates | (only valid if bCurrentState is set to false) - list of the sap.ushell.renderers.fiori2.Renderer.LaunchpadState in which to add the control. |
- Since:
- 1.30
{object} | oItem - the created control |
LaunchpadState. If no launchpad state is provided the content is added in all states. |
{object} | oCustomUIContent | The control to be added to the EndUserFeedback dialog. |
{boolean} | bShowCustomUIContent | Specify whether to display the control. |
- Since:
- 1.30
sap.ushell.Container.getRenderer("fiori2").addFloatingActionButton("sap.ushell.ui.shell.ShellFloatingAction", {id: "testBtn"}, true, true);
{string} | controlType | The (class) name of the control type to create. |
{object} | oControlProperties | The properties that will be passed to the created control. |
{boolean} | bIsVisible | Specify whether to display the control. |
{boolean} | bCurrentState | If true, add the current control only to the current rendered shell state. Once the user navigates to another app or back to the Home page, this control will be removed. |
{String[]} | aStates | (only valid if bCurrentState is set to false) - list of the sap.ushell.renderers.fiori2.Renderer.LaunchpadState in which to add the control. |
- Since:
- 1.30
{object} | oItem - the created control |
LaunchpadState. If no launchpad state is provided the content is added in all states. |
sap.ushell.Container.getRenderer("fiori2").addHeaderEndItem("sap.ushell.ui.shell.ShellHeadItem", {id: "testBtn"}, true, true);
{string} | controlType | The (class) name of the control type to create. Currently only "sap.ushell.ui.shell.ShellHeadItem" control type is supported. |
{object} | oControlProperties | The properties that will be passed to the created control. |
{boolean} | bIsVisible | Specify whether to display the control. |
{boolean} | bCurrentState | If true, add the current control only to the current rendered shell state. Once the user navigates to another app or back to the Home page, this control will be removed. |
{String[]} | aStates | (only valid if bCurrentState is set to false) - list of the sap.ushell.renderers.fiori2.Renderer.LaunchpadState in which to add the control. |
- Since:
- 1.30
{object} | oItem - the created control |
LaunchpadState. If no launchpad state is provided the content is added in all states. |
The new header item will be displayed on the left-hand side of the Fiori Launchpad shell header, according to the given display parameters.
The new header item will be added to the right of any existing header items. The header can contain a maximum of three header items.
Example:
var oRenderer = sap.ushell.Container.getRenderer("fiori2"); oRenderer.addHeaderItem("sap.ushell.ui.shell.ShellHeadItem", {id: "testBtn"}, true, true);
{string} | controlType | The (class) name of the control type to create. For example: "sap.m.Button" |
{object} | oControlProperties | The properties that will be passed to the created control. For example: {id: "testButton"} |
{boolean} | bIsVisible | Specifies whether the header item control is displayed after being created. If true then the control is displayed according to parameters bCurrentState and aStates.If false then the control is created but not displayed. |
{boolean} | bCurrentState | If true then the new created control is added to the current rendered shell state.When the user navigates to a different state including a different application then the control will be removed. If false then add the control to the LaunchPadState itself. |
{String[]} | aStates | (Valid only if bCurrentState is false )A list of shell states (i.e. sap.ushell.renderers.fiori2.Renderer.LaunchpadState) in which the control is added. If no launchpad state is provided the control is added in all states. |
- Since:
- 1.30
{object} | The created control |
LaunchpadState. |
sap.ushell.Container.getRenderer("fiori2").addLeftPaneContent("sap.m.Button", {id: "testBtn", text: "Test Button"}, true, true);
{string} | controlType | The (class) name of the control type to create. |
{object} | oControlProperties | The properties that will be passed to the created control. |
{boolean} | bIsVisible | Specify whether to display the control. |
{boolean} | bCurrentState | If true, add the current control only to the current rendered shell state. Once the user navigates to another app or back to the Home page, this control will be removed. |
{String[]} | aStates | (only valid if bCurrentState is set to false) - list of the sap.ushell.renderers.fiori2.Renderer.LaunchpadState in which to add the control. |
- Since:
- 1.30
{object} | oItem - the created control |
LaunchpadState. If no launchpad state is provided the content is added in all states. |
The new control is displayed in FLP UI according to the given display parameters.
If a sub header already exists, the new created one will replace the existing one.
Example:
var oRenderer = sap.ushell.Container.getRenderer("fiori2"); oRenderer.addSubHeader("sap.m.Bar", {id: "testBar", contentLeft: [new sap.m.Button({text: "Test SubHeader Button", press: function () { sap.m.MessageToast.show("Pressed"); } }) ]}, true, true);
{string} | controlType | The (class) name of the control type to create. For example: "sap.m.Bar" |
{object} | oControlProperties | The properties that will be passed to the created control. For example: {id: "testBar"} |
{boolean} | bIsVisible | Specifies whether the sub header control is displayed after being created. If true then the control is displayed according to parameters bCurrentState and aStates,if false then the control is created but not displayed. |
{boolean} | bCurrentState | If true then the new created control is added to the current rendered shell state.When the user navigates to another application (including the Home page) then the control will be removed. If false then add the control to the LaunchPadState itself. |
{String[]} | aStates | (Valid only if bCurrentState is false )A list of shell states (i.e. sap.ushell.renderers.fiori2.Renderer.LaunchpadState) in which the control is added. If no launchpad state is provided the control is added in all states. |
- Since:
- 1.30
{object} | The created control |
LaunchpadState. |
Example:
sap.ushell.Container.getRenderer("fiori2").addToolAreaItem({ id: "testButton", icon: "sap-icon://documents", expandable: true, press: function (evt) { window.alert("Press" ); }, expand: function (evt) { // This function will be called on the press event of the "expand" button. The result of "expand" event in the UI must be determined by the developer window.alert("Expand" ); } }, true, false, ["home"]);
{object} | oControlProperties | The properties object that will be passed to the constructor of sap.ushell.ui.shell.ToolAreaItem control. |
{boolean} | bIsVisible | Specify whether to display the control. |
{boolean} | bCurrentState | If true, add the current control only to the current rendered shell state. |
{String[]} | aStates | List of the sap.ushell.renderers.fiori2.Renderer.LaunchpadState in which to add the control.Only valid if bCurrentState is set to false. |
- Since:
- 1.30
{object} | oItem - the created control |
sap.ushell.ui.shell.ToolAreaItem |
LaunchpadState. If no launchpad state is provided the content is added in all states. |
and handling of User Preferences actions such as SAVE and CANCEL.
Example:
var oRenderer = sap.ushell.Container.getRenderer("fiori2"); var oEntry = { title: "title", value: function() { return jQuery.Deferred().resolve("entryTitleToBeDisplayed"); }, content: function() { return jQuery.Deferred().resolve(new sap.m.Button("userPrefEntryButton", {text: "Button"})); }, onSave: function() { return jQuery.Deferred().resolve(); } }; oRenderer.addUserPreferencesEntry(oEntry);
{object} | entryObject | The data of the new added User Preference entry Including:
|
- Since:
- 1.30
- Since:
- 1.37
This API is meant to be used for implementing custom elements in the SAP Fiori launchpad. We do not recommend using it on a standard launchpad element, as this may interfere with the standard launchpad functionality.
{String[]} | aIds | the Ids of the Action Button to remove. |
{boolean} | bCurrentState | if true, remove the current control only from the current rendered shell state. |
{String[]} | aStates | list of the sap.ushell.renderers.fiori2.Renderer.LaunchpadState in which to remove the control.(Only valid if bCurrentState is set to false) |
- Since:
- 1.30
LaunchpadState. If no launchpad state is provided the content is removed in all states. |
This API is meant to be used for implementing custom elements in the SAP Fiori launchpad. We do not recommend using it on a standard launchpad element, as this may interfere with the standard launchpad functionality.
{String[]} | aIds | the Ids of the sap.ushell.ui.shell.ShellFloatingAction to remove. |
{boolean} | bCurrentState | if true, remove the current control only from the current rendered shell state. |
{String[]} | aStates | list of the sap.ushell.renderers.fiori2.Renderer.LaunchpadState in which to remove the control.(Only valid if bCurrentState is set to false) |
- Since:
- 1.30
LaunchpadState. If no launchpad state is provided the content is removed in all states. |
This API is meant to be used for implementing custom elements in the SAP Fiori launchpad. We do not recommend using it on a standard launchpad element, as this may interfere with the standard launchpad functionality.
{String[]} | aIds | the Ids of the sap.ushell.ui.shell.ShellHeadItem to remove. |
{boolean} | bCurrentState | if true, remove the current control only from the current rendered shell state. |
{String[]} | aStates | list of the sap.ushell.renderers.fiori2.Renderer.LaunchpadState in which to remove the control.(Only valid if bCurrentState is set to false) |
- Since:
- 1.30
LaunchpadState. If no launchpad state is provided the content is removed in all states. |
This API is meant to be used for implementing custom elements in the SAP Fiori launchpad. We do not recommend using it on a standard launchpad element, as this may interfere with the standard launchpad functionality.
{String[]} | aIds | the Ids of the sap.ushell.ui.shell.ShellHeadItem to remove. |
{boolean} | bCurrentState | if true, remove the current control only from the current rendered shell state. |
{String[]} | aStates | list of the sap.ushell.renderers.fiori2.Renderer.LaunchpadState in which to remove the control.(Only valid if bCurrentState is set to false) |
- Since:
- 1.30
LaunchpadState. If no launchpad state is provided the content is removed in all states. |
This API is meant to be used for implementing custom elements in the SAP Fiori launchpad. We do not recommend using it on a standard launchpad element, as this may interfere with the standard launchpad functionality.
{String[]} | aIds | the Ids of the controls to remove. |
{boolean} | bCurrentState | if true, remove the current control only from the current rendered shell state. |
{String[]} | aStates | list of the sap.ushell.renderers.fiori2.Renderer.LaunchpadState in which to remove the control.(Only valid if bCurrentState is set to false) |
- Since:
- 1.30
LaunchpadState. If no launchpad state is provided the content is removed in all states. |
This API is meant to be used for implementing custom elements in the SAP Fiori launchpad. We do not recommend using it on a standard launchpad element, as this may interfere with the standard launchpad functionality.
{String[]} | aIds | the Ids of the controls to remove. |
{boolean} | bCurrentState | if true, remove the current control only from the current rendered shell state. |
{String[]} | aStates | list of the sap.ushell.renderers.fiori2.Renderer.LaunchpadState in which to remove the control.(Only valid if bCurrentState is set to false) |
- Since:
- 1.30
LaunchpadState. If no launchpad state is provided the content is removed in all states. |
This API is meant to be used for implementing custom elements in the SAP Fiori launchpad. We do not recommend using it on a standard launchpad element, as this may interfere with the standard launchpad functionality.
- Since:
- 1.30
This API is meant to be used for implementing custom elements in the SAP Fiori launchpad. We do not recommend using it on a standard launchpad element, as this may interfere with the standard launchpad functionality.
{String[]} | aIds | the Ids of the sap.ushell.ui.shell.ToolAreaItem control to remove. |
{boolean} | bCurrentState | if true, remove the current control only from the current rendered shell state. |
{String[]} | aStates | list of the sap.ushell.renderers.fiori2.Renderer.LaunchpadState in which to remove the control.(Only valid if bCurrentState is set to false) |
- Since:
- 1.30
LaunchpadState. If no launchpad state is provided the content is removed in all states. |
Example:
var bar = new sap.m.Bar({contentLeft: [new sap.m.Button({text: "Test Footer Button", press: function () { sap.m.MessageToast.show("Pressed"); }}) ]}); var renderer = sap.ushell.Container.getRenderer("fiori2"); renderer.setFooter(bar);
{Object} | oFooter | sap.m.Bar the control to be added as the footer of the Fiori Launchpad |
- Since:
- 1.30
{string} | sTitle | The title to be displayed in the Fiori Launchpad shell header |
- Since:
- 1.30
(see sap.ushell.renderers.fiori2.renderer.LaunchpadState).
Example:
var oRenderer = sap.ushell.Container.getRenderer("fiori2"); oRenderer.setHeaderVisibility(false, false, ["home", "app"]);
{boolean} | bVisible | The visibility of the header |
{boolean} | bCurrentState | If true then the visibility is set only to the current rendered shell state.When the user navigates to another application (including the Home page) then the visibility flag is reset. If false then set the visibility according to the states provided in the aState parameter. |
{String[]} | aStates | (Valid only if bCurrentState is false )A list of shell states (i.e. sap.ushell.renderers.fiori2.Renderer.LaunchpadState) in which the header visibility flag should be set. If no launchpad state is provided the visibility flag is set for all states. |
- Since:
- 1.38
LaunchpadState. |
{string} | sLaunchpadState | LaunchpadState in which to show/hide the left pane |
{boolean} | bVisible | specif whether to display the left pane or not |
- Since:
- 1.30
LaunchpadState. |
Example:
var button1 = new sap.m.Button(); var renderer = sap.ushell.Container.getRenderer("fiori2"); renderer.showActionButton([button1.getId()], false, ["home", "app"]);
{String[]} | aIds | List of ID elements to add to the user actions menu. |
{boolean} | bCurrentState | if true, add the current Buttons only to the current instance of the rendering of the shell. if false, add the Buttons to the LaunchPadState itself. |
{String[]} | aStates | (only valid if bCurrentState is set to false) - list of the sap.ushell.renderers.fiori2.renderer.LaunchpadState in which to add the aIds. |
{boolean} | bIsFirst | if true, the Button will be added to the top of the ActionItems list. |
- Since:
- 1.30
Example:
var button1 = new sap.ushell.ui.shell.ShellFloatingAction(); var renderer = sap.ushell.Container.getRenderer("fiori2"); renderer.showFloatingActionButton([button1.getId()], true);
{String[]} | aIds | List of ID elements to add to the user actions menu. |
{boolean} | bCurrentState | if true, add the current Buttons only to the current instance of the rendering of the shell. if false, add the Buttons to the LaunchPadState itself. |
{String[]} | aStates | (only valid if bCurrentState is set to false) - list of the sap.ushell.renderers.fiori2.renderer.LaunchpadState in which to add the aIds. |
- Since:
- 1.30
Example:
var button1 = new sap.ushell.ui.shell.ShellHeadItem(); var renderer = sap.ushell.Container.getRenderer("fiori2"); renderer.showHeaderEndItem ([button1.getId()], false, ["home", "app"]);
{String[]} | aIds | List of ID elements to add to the shell header. |
{boolean} | bCurrentState | if true, add the current HeaderItems only to the current instance of the rendering of the shell. if false, add the HeaderItems to the LaunchPadState itself. |
{String[]} | aStates | (only valid if bCurrentState is set to false) - list of the sap.ushell.renderers.fiori2.renderer.LaunchpadState in which to add the aIds. |
- Since:
- 1.30
(see sap.ushell.renderers.fiori2.renderer.LaunchpadState).
The HeaderItem controls will be displayed on the left side of the Fiori Launchpad shell header according to the given display parameters.
There can be up to three header items. If the number of existing header items plus the given ones exceeds 3, then the operation fails and no new header items are created.
Example:
var button1 = new sap.ushell.ui.shell.ShellHeadItem(); var button2 = new sap.ushell.ui.shell.ShellHeadItem(); var renderer = sap.ushell.Container.getRenderer("fiori2"); renderer.showHeaderItem ([button1.getId(), button2.getId()], false, ["home", "app"]);
{String[]} | aIds | IDs Array of headerItem controls that should be added to the shell header |
{boolean} | bCurrentState | If true then the new created controls are added to the current rendered shell state.When the user navigates to another application (including the Home page) then the controls will be removed. If false then the controls are added to the LaunchPadState itself. |
{String[]} | aStates | (Valid only if bCurrentState is false )A list of shell states (i.e. sap.ushell.renderers.fiori2.Renderer.LaunchpadState) in which the controls are added. If no launchpad state is provided the controls are added in all states. |
- Since:
- 1.30
LaunchpadState. |
(see sap.ushell.renderers.fiori2.renderer.LaunchpadState).
A sub header is placed in a container, located directly below the main Fiori launchpad shell header.
Example:
var bar = new sap.m.Bar({id: "testBar", contentLeft: [new sap.m.Button({text: "Test SubHeader Button", press: function () { sap.m.MessageToast.show("Pressed"); }}) ]}); var oRenderer = sap.ushell.Container.getRenderer("fiori2"); oRenderer.showSubHeader([bar.getId()], false, ["home", "app"]);
{String[]} | aIds | Array of sub header control IDs to be added |
{boolean} | bCurrentState | If true then the new created controls are added only to the current rendered shell state.When the user navigates to another application (including the Home page) then the controls will be removed. If false then add the control to the LaunchPadState itself. |
{String[]} | aStates | (Valid only if bCurrentState is false )A list of shell states (i.e. sap.ushell.renderers.fiori2.Renderer.LaunchpadState) in which the controls are added. If no launchpad state is provided the controls are added in all states. |
- Since:
- 1.30
LaunchpadState. |
{String} | sLaunchpadState? | LaunchpadState in which to show/hide the ToolArea |
{boolean} | bVisible? | specifies whether to display the ToolArea or not |
LaunchpadState |
Example:
var button1 = new sap.ushell.ui.shell.ToolAreaItem(); var renderer = sap.ushell.Container.getRenderer("fiori2"); renderer.showToolAreaItem(button1.getId(), false, ["home", "app"]);
{string} | sId | ID of the element to add to the Tool Area. |
{boolean} | bCurrentState | if true, add the current ToolAreaItems only to the current instance of the rendering of the shell. if false, add the ToolAreaItems to the LaunchPadState itself. |
{String[]} | aStates+ | (only valid if bCurrentState is set to false) - list of the sap.ushell.renderers.fiori2.renderer.LaunchpadState in which to add the aIds. |
- Since:
- 1.30