class sap.ui.integration.ActionDefinition

Visiblity: public
UX Guidelines:
Implements:
Available since: N/A
Module: sap/ui/integration/ActionDefinition
Application Component: CA-UI5-CTR

Represents an action, which appears in the header of sap.ui.integration.widgets.Card. Useful in Component card and Extension.


Constructor

Constructor for a new ActionDefinition.

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

new sap.ui.integration.ActionDefinition(sId?, mSettings?)
Param Type Default Value Description
sId? string

ID for the new ActionDefinition, generated automatically if no ID is given.

mSettings? object

Initial settings for the new ActionDefinition.


Properties

Name Type Default Value Description
buttonType sap.m.ButtonType Transparent

The type of the action button.

Visibility: public
enabled boolean true

Indicates whether the user can interact with the action button or not. Note: Disabled controls cannot be focused and they are out of the navigation tab-chain.

Visibility: public
icon sap.ui.core.URI

The icon of the action button.

Visibility: public
parameters object

The parameters of the action.

Visibility: public
text string empty string

The text of the action button.

Visibility: public
type sap.ui.integration.CardActionType

The type of the action.

Visibility: public
visible boolean true

Whether the action button should be visible on the screen.

Visibility: public

Associations

Name Cardinality Type Description
_menuButton 0..1 sap.m.Button

The button in the actions menu, which is related to this action.


Events Overview

Event Description
press

Fired when the action button is pressed.

press

Fired when the action button is pressed.

Param Type Description
oControlEvent sap.ui.base.Event
getSource sap.ui.base.EventProvider
getParameters object

Methods Overview

Method Description
attachPress

Attaches event handler fnFunction to the press event of this sap.ui.integration.ActionDefinition.

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.integration.ActionDefinition itself.

Fired when the action button is pressed.

detachPress

Detaches event handler fnFunction from the press event of this sap.ui.integration.ActionDefinition.

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

sap.ui.integration.ActionDefinition.extend

Creates a new subclass of class sap.ui.integration.ActionDefinition 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.

firePress

Fires event press to attached listeners.

getButtonType

Gets current value of property buttonType.

The type of the action button.

Default value is Transparent.

getEnabled

Gets current value of property enabled.

Indicates whether the user can interact with the action button or not. Note: Disabled controls cannot be focused and they are out of the navigation tab-chain.

Default value is true.

getIcon

Gets current value of property icon.

The icon of the action button.

sap.ui.integration.ActionDefinition.getMetadata

Returns a metadata object for class sap.ui.integration.ActionDefinition.

getParameters

Gets current value of property parameters.

The parameters of the action.

getText

Gets current value of property text.

The text of the action button.

Default value is empty string.

getType

Gets current value of property type.

The type of the action.

getVisible

Gets current value of property visible.

Whether the action button should be visible on the screen.

Default value is true.

setButtonType

Sets a new value for property buttonType.

The type of the action button.

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

Default value is Transparent.

setEnabled

Sets a new value for property enabled.

Indicates whether the user can interact with the action button or not. Note: Disabled controls cannot be focused and they are out of the navigation tab-chain.

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

Default value is true.

setIcon

Sets a new value for property icon.

The icon of the action button.

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

setParameters

Sets a new value for property parameters.

The parameters of the action.

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

setText

Sets a new value for property text.

The text of the action button.

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

Default value is empty string.

setType

Sets a new value for property type.

The type of the action.

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

setVisible

Sets a new value for property visible.

Whether the action button should be visible on the screen.

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

Default value is true.

attachPress

Attaches event handler fnFunction to the press event of this sap.ui.integration.ActionDefinition.

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.integration.ActionDefinition itself.

Fired when the action button is pressed.

Param Type DefaultValue Description
oData object

An application-specific payload object that will be passed to the event handler along with the event object when firing the event

fnFunction function(sap.ui.base.Event) : void

The function to be called when the event occurs

oListener object

Context object to call the event handler with. Defaults to this sap.ui.integration.ActionDefinition itself

detachPress

Detaches event handler fnFunction from the press event of this sap.ui.integration.ActionDefinition.

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

Param Type DefaultValue Description
fnFunction function(sap.ui.base.Event) : void

The function to be called, when the event occurs

oListener object

Context object on which the given function had to be called

sap.ui.integration.ActionDefinition.extend

Creates a new subclass of class sap.ui.integration.ActionDefinition 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.

Param Type DefaultValue Description
sClassName string

Name of the class being created

oClassInfo object

Object literal with information about the class

FNMetaImpl function

Constructor function for the metadata object; if not given, it defaults to the metadata implementation used by this class

firePress

Fires event press to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

getButtonType

Gets current value of property buttonType.

The type of the action button.

Default value is Transparent.

getEnabled

Gets current value of property enabled.

Indicates whether the user can interact with the action button or not. Note: Disabled controls cannot be focused and they are out of the navigation tab-chain.

Default value is true.

getIcon

Gets current value of property icon.

The icon of the action button.

sap.ui.integration.ActionDefinition.getMetadata

Returns a metadata object for class sap.ui.integration.ActionDefinition.

getParameters

Gets current value of property parameters.

The parameters of the action.

getText

Gets current value of property text.

The text of the action button.

Default value is empty string.

getType

Gets current value of property type.

The type of the action.

getVisible

Gets current value of property visible.

Whether the action button should be visible on the screen.

Default value is true.

setButtonType

Sets a new value for property buttonType.

The type of the action button.

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

Default value is Transparent.

Param Type DefaultValue Description
sButtonType sap.m.ButtonType Transparent

New value for property buttonType

setEnabled

Sets a new value for property enabled.

Indicates whether the user can interact with the action button or not. Note: Disabled controls cannot be focused and they are out of the navigation tab-chain.

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

Default value is true.

Param Type DefaultValue Description
bEnabled boolean true

New value for property enabled

setIcon

Sets a new value for property icon.

The icon of the action button.

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

Param Type DefaultValue Description
sIcon sap.ui.core.URI

New value for property icon

setParameters

Sets a new value for property parameters.

The parameters of the action.

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

Param Type DefaultValue Description
oParameters object

New value for property parameters

setText

Sets a new value for property text.

The text of the action button.

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

Default value is empty string.

Param Type DefaultValue Description
sText string ""

New value for property text

setType

Sets a new value for property type.

The type of the action.

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

Param Type DefaultValue Description
sType sap.ui.integration.CardActionType

New value for property type

setVisible

Sets a new value for property visible.

Whether the action button should be visible on the screen.

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

Default value is true.

Param Type DefaultValue Description
bVisible boolean true

New value for property visible