Class sap.suite.ui.commons.LinkActionSheetModule: sap/suite/ui/commons/LinkActionSheet

extends ActionSheet

This control contains one or more sap.m.Button controls or sap.ui.commons.Link controls. The LinkActionSheet control is closed if the user chooses one of the buttons or links. It looks similar to sap.m.Dialog in iPhone and Android, and to sap.m.Popover in iPad.

Deprecated API:Since version 1.32. Deprecated. Object page should be used instead.

Constructor Summary
new sap.suite.ui.commons.LinkActionSheet(sId?, mSettings?)Constructor for a new LinkActionSheet.
Event Summary
itemPress(oControlEvent)The event is fired when the user chooses any item.
Events borrowed from class sap.ui.core.Control
Method Summary
sap.suite.ui.commons.LinkActionSheet.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.suite.ui.commons.LinkActionSheet with name sClassName and enriches it with the information contained in oClassInfo.
sap.suite.ui.commons.LinkActionSheet.getMetadata()Returns a metadata object for class sap.suite.ui.commons.LinkActionSheet.
addItem(oItem)Adds some item oItem to the aggregation named items.
attachItemPress(oData?, fnFunction, oListener?)Attach event handler fnFunction to the 'itemPress' event of this sap.suite.ui.commons.LinkActionSheet.
destroyItems()Destroys all the items in the aggregation named items.
detachItemPress(fnFunction, oListener)Detach event handler fnFunction from the 'itemPress' event of this sap.suite.ui.commons.LinkActionSheet.
fireItemPress(mArguments?)Fire event itemPress to attached listeners.
getItems()Getter for aggregation items.
indexOfItem(oItem)Checks for the provided sap.ui.core.Control in the aggregation named items and returns its index if found or -1 otherwise.
insertItem(oItem, iIndex)Inserts a item into the aggregation named items.
removeAllItems()Removes all the controls in the aggregation named items.
removeItem(vItem)Removes an item from the aggregation named items.
Constructor Detail
new sap.suite.ui.commons.LinkActionSheet(sId?, mSettings?)
Constructor for a new LinkActionSheet.

Accepts an object literal mSettings that defines initial property values, aggregated and associated objects as well as event handlers.

If the name of a setting is ambiguous (e.g. a property has the same name as an event), then the framework assumes property, aggregation, association, event in that order. To override this automatic resolution, one of the prefixes "aggregation:", "association:" or "event:" can be added to the name of the setting (such a prefixed name must be enclosed in single or double quotes).

The supported settings are:

  • Properties
    • Aggregations
      • items : sap.ui.core.Control[]
    • Associations
      • Events
        • itemPress : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]

      In addition, all settings applicable to the base type sap.m.ActionSheet can be used as well.

      Parameters:
      {string}sId? id for the new control, generated automatically if no id is given
      {object}mSettings? initial settings for the new control
      Deprecated:
      Since version 1.32. Deprecated. Object page should be used instead.
      Event Detail
      itemPress(oControlEvent)
      The event is fired when the user chooses any item.
      Parameters:
      {sap.ui.base.Event}oControlEvent
      {sap.ui.base.EventProvider}oControlEvent.getSource
      {object}oControlEvent.getParameters
      {sap.ui.core.Control}oControlEvent.getParameters.item The object that initiated the event.
      Method Detail
      sap.suite.ui.commons.LinkActionSheet.extend(sClassName, oClassInfo?, FNMetaImpl?): function
      Creates a new subclass of class sap.suite.ui.commons.LinkActionSheet with name sClassName and enriches it with the information contained in oClassInfo.

      oClassInfo might contain the same kind of informations as described in Element.extend.

      Parameters:
      {string}sClassName name of the class to be created
      {object}oClassInfo? object literal with informations about the class
      {function}FNMetaImpl? constructor function for the metadata object. If not given, it defaults to sap.ui.core.ElementMetadata.
      Returns:
      {function} the created class / constructor function
      sap.suite.ui.commons.LinkActionSheet.getMetadata(): sap.ui.base.Metadata
      Returns a metadata object for class sap.suite.ui.commons.LinkActionSheet.
      Returns:
      {sap.ui.base.Metadata} Metadata object describing this class
      Adds some item oItem to the aggregation named items.
      Parameters:
      {sap.ui.core.Control}oItem the item to add; if empty, nothing is inserted
      Returns:
      {sap.suite.ui.commons.LinkActionSheet}this to allow method chaining
      attachItemPress(oData?, fnFunction, oListener?): sap.suite.ui.commons.LinkActionSheet
      Attach event handler fnFunction to the 'itemPress' event of this sap.suite.ui.commons.LinkActionSheet.
      . When called, the context of the event handler (its this) will be bound to oListener if specified otherwise to this sap.suite.ui.commons.LinkActionSheet.
      itself.

      The event is fired when the user chooses any item.

      Parameters:
      {object}oData? An application specific payload object, that will be passed to the event handler along with the event object when firing the event.
      {function}fnFunction The function to call, when the event occurs.
      {object}oListener? Context object to call the event handler with. Defaults to this sap.suite.ui.commons.LinkActionSheet.
      itself.
      Returns:
      {sap.suite.ui.commons.LinkActionSheet}this to allow method chaining
      Destroys all the items in the aggregation named items.
      Returns:
      {sap.suite.ui.commons.LinkActionSheet}this to allow method chaining
      detachItemPress(fnFunction, oListener): sap.suite.ui.commons.LinkActionSheet
      Detach event handler fnFunction from the 'itemPress' event of this sap.suite.ui.commons.LinkActionSheet.

      The passed function and listener object must match the ones used for event registration.

      Parameters:
      {function}fnFunction The function to call, when the event occurs.
      {object}oListener Context object on which the given function had to be called.
      Returns:
      {sap.suite.ui.commons.LinkActionSheet}this to allow method chaining
      fireItemPress(mArguments?): boolean
      Fire event itemPress to attached listeners.

      Listeners may prevent the default action of this event using the preventDefault-method on the event object.

      Expects following event parameters:

      • 'item' of type sap.ui.core.Control The object that initiated the event.
      Parameters:
      {Map}mArguments? the arguments to pass along with the event.
      Returns:
      {boolean} whether to prevent the default action
      getItems(): sap.ui.core.Control[]
      Getter for aggregation items.
      These buttons or links are added to the content area in the LinkActionSheet control. If the user chooses a button or a link, the LinkActionSheet is closed before the event listener is called.
      Returns:
      {sap.ui.core.Control[]}
      indexOfItem(oItem): int
      Checks for the provided sap.ui.core.Control in the aggregation named items and returns its index if found or -1 otherwise.
      Parameters:
      {sap.ui.core.Control}oItem the item whose index is looked for.
      Returns:
      {int} the index of the provided control in the aggregation if found, or -1 otherwise
      insertItem(oItem, iIndex): sap.suite.ui.commons.LinkActionSheet
      Inserts a item into the aggregation named items.
      Parameters:
      {sap.ui.core.Control}oItem the item to insert; if empty, nothing is inserted
      {int}iIndex the 0-based index the item should be inserted at; for a negative value of iIndex, the item is inserted at position 0; for a value greater than the current size of the aggregation, the item is inserted at the last position
      Returns:
      {sap.suite.ui.commons.LinkActionSheet}this to allow method chaining
      removeAllItems(): sap.ui.core.Control[]
      Removes all the controls in the aggregation named items.
      Additionally unregisters them from the hosting UIArea.
      Returns:
      {sap.ui.core.Control[]} an array of the removed elements (might be empty)
      removeItem(vItem): sap.ui.core.Control
      Removes an item from the aggregation named items.
      Parameters:
      {int|string|sap.ui.core.Control}vItem the item to remove or its index or id
      Returns:
      {sap.ui.core.Control} the removed item or null