Methods of the RendererExtensions API that add an item to, or remove the added item from, the Options menu.
addOptionsActionSheetButton(oButton[, sLaunchpadState1],[sLaunchpadState2],[sLaunchpadState3])
removeOptionsActionSheetButton(oButton[, sLaunchpadState1],[sLaunchpadState2],[sLaunchpadState3])
These methods are part of the SAPUI5 sap.ushell.renderers.fiori2 namespace. For more information, see SAPUI5 Demo Kit: Controls .
Parameter | Type | Description |
---|---|---|
oButton | Object | The button to be added. The button should have an icon, text, tooltip, and a press callback. |
sLaunchpadState1 | String | Optional. A launchpad state in which to add the button. |
sLaunchpadState2 | String | Optional. A launchpad state in which to add the button. |
sLaunchpadState3 | String | Optional. A launchpad state in which to add the button. |
<SCRIPT language ="JavaScript"> ... var button1 = new sap.m.Button(); var rendererExt = sap.ushell.renderers.fiori2.RendererExtensions; rendererExt.addOptionsActionSheetButton(button1,rendererExt.LaunchpadState.Home,rendererExt.LaunchpadState.Catalog,rendererExt.LaunchpadState.App); rendererExt.removeOptionsActionSheetButton(button1,rendererExt.LaunchpadState.Home,rendererExt.LaunchpadState.Catalog,rendererExt.LaunchpadState.App); ... <SCRIPT>
You can only remove buttons that were added to the action sheet by the addOptionsActionSheetButton method.