The mobile framework pages come with an action button that enables you to perform various actions, such as refresh, add to favorites, and log off.
On the Smartphone Framework Page , the action button opens a horizontal toolbar that contains the available actions.
On the Tablet Framework Page , the action button opens a vertical menu that displays the available actions.
You can configure different application-specific sets of actions, using the createCollection and createItem methods in the Collections client-side APIs for the Ajax Framework Page (AFP), and the collection type ACTION_BAR_ITEM .
Create a collection of type ACTION_BAR_ITEM , to contain the actions.
Create a collection item for each action.
Specify an icon for the action. Otherwise, a default icon is used.
//Create a collection to contain the action EPCM.getSAPTop().LSAPI.Collections.createCollection( "collectionID", EPCM.getSAPTop().LSAPI.Collections.Types.ACTION_BAR_ITEM, "collectionTitle", "collectionTooltip", null, null, true, 10, false); //Create a collection item to define the action EPCM.getSAPTop().LSAPI.Collections.createItem( "collectionID", //parent collection ID "itemID", "My Action", "actionTooltip", function(){ alert("Action was chosen"); }, null, true, 20, null, null, true, false, "/images/actionBar/action_icon.png"); //action icon
To add more than one action, create several collection items within a single collection.
For information about configuring the out-of-the-box action button and its actions, see Configuring Properties of Mobile Framework Pages .
For more information about the Collections API, see Collections API .