kony.ui.ActionItem Function
The details of the kony.ui.ActionItem function, which is part of the kony.ui Namespace, are as follows.
Constructs an ActionItem
object for use in an ActionSheet object.
Syntax
new kony.ui.ActionItem(actionItemParams);
Input Parameters
actionItemParams
A JavaScript object containing key-value pairs that define the configuration parameters for the action item. This object must contain the following keys.
Constant | Description |
---|---|
title | A string that specifies the title for the action item. |
style | A value from the Action Item Style Constants that selects the style of the action item. |
actionCallback | A JavaScript function that handles user selections from the action item. For more information, see Remarks below. |
Example
//Creating the Action Item Object setActionSheet: function(){ var actionItem = new kony.ui.ActionItem({ "title": "Open Basecamp", "style": constants.ACTION_STYLE_DEFAULT, "action": function(){ kony.application.openURL("https://basecamp.kony.com/s/"); }
Return Values
Returns an ActionItem
object that can be added to an Action Sheet.
Remarks
The actionCallback
function, which is passed into this function through the actionSheetParams parameter, must have the following prototype.
actionItemCallback(actionSheetObject, actionItem1);
where actionSheetObject is a handle to the ActionSheet
object that the ActionItem
object is associated with, and actionItem1 is a handle to the ActionItem
object that the user selected.
Platform Availability
iOS