Class sap.ui.ux3.ThingActionModule: sap/ui/ux3/ThingAction

extends Element

Thing Action for Swatch, QuickView, Thinginspector

Deprecated API:Since version 1.38.

Constructor Summary
new sap.ui.ux3.ThingAction(sId?, mSettings?)Constructor for a new ThingAction.
Event Summary
select(oControlEvent)Event will be fired when the action was triggered.
Method Summary
sap.ui.ux3.ThingAction.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.ui.ux3.ThingAction with name sClassName and enriches it with the information contained in oClassInfo.
sap.ui.ux3.ThingAction.getMetadata()Returns a metadata object for class sap.ui.ux3.ThingAction.
attachSelect(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the select event of this sap.ui.ux3.ThingAction.
detachSelect(fnFunction, oListener)Detaches event handler fnFunction from the select event of this sap.ui.ux3.ThingAction.
fireSelect(mArguments?)Fires event select to attached listeners.
getEnabled()Gets current value of property enabled.
getText()Gets current value of property text.
setEnabled(bEnabled)Sets a new value for property enabled.
setText(sText)Sets a new value for property text.
Constructor Detail
new sap.ui.ux3.ThingAction(sId?, mSettings?)
Constructor for a new ThingAction.

Accepts an object literal mSettings that defines initial property values, aggregated and associated objects as well as event handlers. See sap.ui.base.ManagedObject for a general description of the syntax of the settings object.

The supported settings are:

  • Properties
  • Events
    • select : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]

In addition, all settings applicable to the base type sap.ui.core.Element 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.38.
Event Detail
select(oControlEvent)
Event will be fired when the action was triggered.
Parameters:
{sap.ui.base.Event}oControlEvent
{sap.ui.base.EventProvider}oControlEvent.getSource
{object}oControlEvent.getParameters
{string}oControlEvent.getParameters.id Id of selected action
{sap.ui.ux3.ThingAction}oControlEvent.getParameters.action Selected Thing Action
Method Detail
sap.ui.ux3.ThingAction.extend(sClassName, oClassInfo?, FNMetaImpl?): function
Creates a new subclass of class sap.ui.ux3.ThingAction with name sClassName and enriches it with the information contained in oClassInfo.

oClassInfo might contain the same kind of information as described in sap.ui.core.Element.extend.

Parameters:
{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
Returns:
{function} Created class / constructor function
sap.ui.ux3.ThingAction.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.ui.ux3.ThingAction.
Returns:
{sap.ui.base.Metadata} Metadata object describing this class
attachSelect(oData?, fnFunction, oListener?): sap.ui.ux3.ThingAction
Attaches event handler fnFunction to the select event of this sap.ui.ux3.ThingAction.

When called, the context of the event handler (its this) will be bound to oListener if specified, otherwise it will be bound to this sap.ui.ux3.ThingAction itself.

Event will be fired when the action was triggered.

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 be called when the event occurs
{object}oListener? Context object to call the event handler with. Defaults to this sap.ui.ux3.ThingAction itself
Returns:
{sap.ui.ux3.ThingAction} Reference to this in order to allow method chaining
detachSelect(fnFunction, oListener): sap.ui.ux3.ThingAction
Detaches event handler fnFunction from the select event of this sap.ui.ux3.ThingAction.

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

Parameters:
{function}fnFunction The function to be called, when the event occurs
{object}oListener Context object on which the given function had to be called
Returns:
{sap.ui.ux3.ThingAction} Reference to this in order to allow method chaining
fireSelect(mArguments?): sap.ui.ux3.ThingAction
Fires event select to attached listeners.

Expects the following event parameters:

  • id of type stringId of selected action
  • action of type sap.ui.ux3.ThingActionSelected Thing Action
Parameters:
{Map}mArguments? The arguments to pass along with the event
Returns:
{sap.ui.ux3.ThingAction} Reference to this in order to allow method chaining
getEnabled(): boolean
Gets current value of property enabled.

action enabled (true/false)

Default value is true.

Returns:
{boolean} Value of property enabled
getText(): string
Gets current value of property text.

text of action

Returns:
{string} Value of property text
setEnabled(bEnabled): sap.ui.ux3.ThingAction
Sets a new value for property enabled.

action enabled (true/false)

When called with a value of null or undefined, the default value of the property will be restored.

Default value is true.

Parameters:
{boolean}bEnabled New value for property enabled
Returns:
{sap.ui.ux3.ThingAction} Reference to this in order to allow method chaining
setText(sText): sap.ui.ux3.ThingAction
Sets a new value for property text.

text of action

When called with a value of null or undefined, the default value of the property will be restored.

Parameters:
{string}sText New value for property text
Returns:
{sap.ui.ux3.ThingAction} Reference to this in order to allow method chaining