Class sap.ui.ux3.ActionBarModule: sap/ui/ux3/ActionBar

extends Control

A special toolbar with predefined social actions which can be shown as needed. These are: Create an update (Feed), Follow, Mark for Follow Up, Mark as Favorite and Open Thing.

In addition business actions (ThingAction instances) can be added which are either displayed as MenuItems of the 'More' menu button or as individual tool bar buttons.

When using this control, please be aware that it fulfills rather specific requirements: it has been designed for and is used within composite controls QuickView and ThingInspector.

Deprecated API:
Since version 1.38. Instead, use the sap.m.Toolbar or sap.m.OverflowToolbar control.
Constructor Summary
new sap.ui.ux3.ActionBar(sId?, mSettings?)Constructor for a new ActionBar.
Event Summary
actionSelected(oControlEvent)Fired when any of the social action’s toolbar buttons except ‘Update’ or any of the business action’s menu items resp.
feedSubmit(oControlEvent)Fired when a new feed entry is submitted.
Events borrowed from class sap.ui.core.Control
Method Summary
sap.ui.ux3.ActionBar.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.ui.ux3.ActionBar with name sClassName and enriches it with the information contained in oClassInfo.
sap.ui.ux3.ActionBar.getMetadata()Returns a metadata object for class sap.ui.ux3.ActionBar.
attachActionSelected(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the actionSelected event of this sap.ui.ux3.ActionBar.
attachFeedSubmit(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the feedSubmit event of this sap.ui.ux3.ActionBar.
closePopups()Closes all popups which might be opened as ActionBar children These are the more- and follow menu and the feeder popup
detachActionSelected(fnFunction, oListener)Detaches event handler fnFunction from the actionSelected event of this sap.ui.ux3.ActionBar.
detachFeedSubmit(fnFunction, oListener)Detaches event handler fnFunction from the feedSubmit event of this sap.ui.ux3.ActionBar.
fireActionSelected(mParameters?)Fires event actionSelected to attached listeners.
fireFeedSubmit(mParameters?)Fires event feedSubmit to attached listeners.
getAlwaysShowMoreMenu()Gets current value of property alwaysShowMoreMenu.
getBusinessActions()Gets content of aggregation businessActions.
getDividerWidth()Gets current value of property dividerWidth.
getFavoriteState()Gets current value of property favoriteState.
getFlagState()Gets current value of property flagState.
getFollowState()Gets current value of property followState.
getShowFavorite()Gets current value of property showFavorite.
getShowFlag()Gets current value of property showFlag.
getShowFollow()Gets current value of property showFollow.
getShowOpen()Gets current value of property showOpen.
getShowUpdate()Gets current value of property showUpdate.
getThingIconURI()Gets current value of property thingIconURI.
getUpdateState()Gets current value of property updateState.
indexOfBusinessAction(oBusinessAction)Checks for the provided sap.ui.ux3.ThingAction in the aggregation businessActions.
isActive()Checks whether the control is still valid (is in the DOM).
setAlwaysShowMoreMenu(bAlwaysShowMoreMenu)Sets a new value for property alwaysShowMoreMenu.
setDividerWidth(sDividerWidth)Sets a new value for property dividerWidth.
setFavoriteState(bFavoriteState)Sets a new value for property favoriteState.
setFlagState(bFlagState)Sets a new value for property flagState.
setFollowState(sFollowState)Sets a new value for property followState.
setShowFavorite(bShowFavorite)Sets a new value for property showFavorite.
setShowFlag(bShowFlag)Sets a new value for property showFlag.
setShowFollow(bShowFollow)Sets a new value for property showFollow.
setShowOpen(bShowOpen)Sets a new value for property showOpen.
setShowUpdate(bShowUpdate)Sets a new value for property showUpdate.
setThingIconURI(sThingIconURI)Sets a new value for property thingIconURI.
setUpdateState(bUpdateState)Sets a new value for property updateState.
Constructor Detail
new sap.ui.ux3.ActionBar(sId?, mSettings?)

Constructor for a new ActionBar.

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:

In addition, all settings applicable to the base type sap.ui.core.Control can be used as well.

Parameters:
stringsId?id for the new control, generated automatically if no id is given
objectmSettings?initial settings for the new control
Event Detail
actionSelected(oControlEvent)

Fired when any of the social action’s toolbar buttons except ‘Update’ or any of the business action’s menu items resp. buttons is pressed. The selected action can be identified by its id and newState (the latter if applicable only) ‘Follow’ button + menu: id: follow, newState: Follow/Hold/Default ‘Mark for follow up’ button: id: flag, newState: true/false ‘Favorite’ button: id: favorite, newState: true/false ‘Open Thing Inspector’ button id: open Business Actions: id: the ThingAction id

For ‘Update’, please refer to event ‘feedSubmit’

Parameters:
sap.ui.base.EventoControlEvent
sap.ui.base.EventProvideroControlEvent.getSource
objectoControlEvent.getParameters
stringoControlEvent.getParameters.idId of selected ThingAction
sap.ui.ux3.ThingActionoControlEvent.getParameters.actionSelected ThingAction
stringoControlEvent.getParameters.newStateNew State of the selected action.Only filled if the respective action maintains a state property, for example 'FollowUp' or 'Favorite'
feedSubmit(oControlEvent)
Fired when a new feed entry is submitted.
Parameters:
sap.ui.base.EventoControlEvent
sap.ui.base.EventProvideroControlEvent.getSource
objectoControlEvent.getParameters
stringoControlEvent.getParameters.textFeed text
Method Detail
sap.ui.ux3.ActionBar.extend(sClassName, oClassInfo?, FNMetaImpl?): function

Creates a new subclass of class sap.ui.ux3.ActionBar 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.Control.extend.

Parameters:
stringsClassNameName of the class being created
objectoClassInfo?Object literal with information about the class
functionFNMetaImpl?Constructor function for the metadata object; if not given, it defaults to sap.ui.core.ElementMetadata
Returns:
functionCreated class / constructor function
sap.ui.ux3.ActionBar.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.ui.ux3.ActionBar.
Returns:
sap.ui.base.MetadataMetadata object describing this class
attachActionSelected(oData?, fnFunction, oListener?): sap.ui.ux3.ActionBar

Attaches event handler fnFunction to the actionSelected event of this sap.ui.ux3.ActionBar.

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.ActionBar itself.

Fired when any of the social action’s toolbar buttons except ‘Update’ or any of the business action’s menu items resp. buttons is pressed. The selected action can be identified by its id and newState (the latter if applicable only) ‘Follow’ button + menu: id: follow, newState: Follow/Hold/Default ‘Mark for follow up’ button: id: flag, newState: true/false ‘Favorite’ button: id: favorite, newState: true/false ‘Open Thing Inspector’ button id: open Business Actions: id: the ThingAction id

For ‘Update’, please refer to event ‘feedSubmit’

Parameters:
objectoData?An application-specific payload object that will be passed to the event handler along with the event object when firing the event
functionfnFunctionThe function to be called when the event occurs
objectoListener?Context object to call the event handler with. Defaults to this sap.ui.ux3.ActionBar itself
Returns:
sap.ui.ux3.ActionBarReference to this in order to allow method chaining
attachFeedSubmit(oData?, fnFunction, oListener?): sap.ui.ux3.ActionBar

Attaches event handler fnFunction to the feedSubmit event of this sap.ui.ux3.ActionBar.

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.ActionBar itself.

Fired when a new feed entry is submitted.

Parameters:
objectoData?An application-specific payload object that will be passed to the event handler along with the event object when firing the event
functionfnFunctionThe function to be called when the event occurs
objectoListener?Context object to call the event handler with. Defaults to this sap.ui.ux3.ActionBar itself
Returns:
sap.ui.ux3.ActionBarReference to this in order to allow method chaining
closePopups(): void
Closes all popups which might be opened as ActionBar children These are the more- and follow menu and the feeder popup
detachActionSelected(fnFunction, oListener): sap.ui.ux3.ActionBar

Detaches event handler fnFunction from the actionSelected event of this sap.ui.ux3.ActionBar.

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

Parameters:
functionfnFunctionThe function to be called, when the event occurs
objectoListenerContext object on which the given function had to be called
Returns:
sap.ui.ux3.ActionBarReference to this in order to allow method chaining
detachFeedSubmit(fnFunction, oListener): sap.ui.ux3.ActionBar

Detaches event handler fnFunction from the feedSubmit event of this sap.ui.ux3.ActionBar.

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

Parameters:
functionfnFunctionThe function to be called, when the event occurs
objectoListenerContext object on which the given function had to be called
Returns:
sap.ui.ux3.ActionBarReference to this in order to allow method chaining
fireActionSelected(mParameters?): sap.ui.ux3.ActionBar
Fires event actionSelected to attached listeners.
Parameters:
objectmParameters?Parameters to pass along with the event
stringmParameters.id?Id of selected ThingAction
sap.ui.ux3.ThingActionmParameters.action?Selected ThingAction
stringmParameters.newState?New State of the selected action.Only filled if the respective action maintains a state property, for example 'FollowUp' or 'Favorite'
Returns:
sap.ui.ux3.ActionBarReference to this in order to allow method chaining
fireFeedSubmit(mParameters?): sap.ui.ux3.ActionBar
Fires event feedSubmit to attached listeners.
Parameters:
objectmParameters?Parameters to pass along with the event
stringmParameters.text?Feed text
Returns:
sap.ui.ux3.ActionBarReference to this in order to allow method chaining
getAlwaysShowMoreMenu(): boolean

Gets current value of property alwaysShowMoreMenu.

If true, business actions are rendered as menu items of the 'More' menu button. Otherwise, 'More' menu button is only displayed for overflow and business actions are rendered as inidividual buttons.

Default value is true.

Returns:
booleanValue of property alwaysShowMoreMenu
getBusinessActions(): sap.ui.ux3.ThingAction[]

Gets content of aggregation businessActions.

Displayed on the actionBar's right hand-side, either as menu item under 'More' or as individual buttons

Returns:
sap.ui.ux3.ThingAction[]
getDividerWidth(): sap.ui.core.CSSSize

Gets current value of property dividerWidth.

The minimum width of ActionBar's the social actions part: business action controls have to be rendered outside this area

Returns:
sap.ui.core.CSSSizeValue of property dividerWidth
getFavoriteState(): boolean

Gets current value of property favoriteState.

Indicates whether “Favorite” is active

Returns:
booleanValue of property favoriteState
getFlagState(): boolean

Gets current value of property flagState.

Indicates whether “Mark for Follow Up” is active

Returns:
booleanValue of property flagState
getFollowState(): sap.ui.ux3.FollowActionState

Gets current value of property followState.

Keeps track of the actionBars Follow/Unfollow button’s state. Its value is one of - FollowActionState.Default - FollowActionState.Follow - FollowActionState.Hold

Default value is Default.

Returns:
sap.ui.ux3.FollowActionStateValue of property followState
getShowFavorite(): boolean

Gets current value of property showFavorite.

Indicates whether social action “Favorite” is shown, default is ‘true’

Default value is true.

Returns:
booleanValue of property showFavorite
getShowFlag(): boolean

Gets current value of property showFlag.

Indicates whether social action “Mark for Follow Up” is shown, default is ‘true’

Default value is true.

Returns:
booleanValue of property showFlag
getShowFollow(): boolean

Gets current value of property showFollow.

Indicates whether social action “Follow” is shown, default is ‘true’

Default value is true.

Returns:
booleanValue of property showFollow
getShowOpen(): boolean

Gets current value of property showOpen.

Indicates whether social action “Open” is shown, default is ‘true’

Default value is true.

Returns:
booleanValue of property showOpen
getShowUpdate(): boolean

Gets current value of property showUpdate.

Indicates whether social action “Update” is shown, default is ‘true’

Default value is true.

Returns:
booleanValue of property showUpdate
getThingIconURI(): sap.ui.core.URI

Gets current value of property thingIconURI.

The thing icon uri. Icon will be displayed in Feeder

Returns:
sap.ui.core.URIValue of property thingIconURI
getUpdateState(): boolean

Gets current value of property updateState.

Indicates whether “Update” is active

Returns:
booleanValue of property updateState
indexOfBusinessAction(oBusinessAction): int
Checks for the provided sap.ui.ux3.ThingAction in the aggregation businessActions. and returns its index if found or -1 otherwise.
Parameters:
sap.ui.ux3.ThingActionoBusinessActionThe businessAction whose index is looked for
Returns:
intThe index of the provided control in the aggregation if found, or -1 otherwise
isActive(): boolean
Checks whether the control is still valid (is in the DOM). ActionBar instance is rendered if and only if 'isActive' returns 'true'. This check is called implicitely by the rendere, MUST not be removed.
Returns:
booleanTrue if the control is still in the active DOM
setAlwaysShowMoreMenu(bAlwaysShowMoreMenu): sap.ui.ux3.ActionBar

Sets a new value for property alwaysShowMoreMenu.

If true, business actions are rendered as menu items of the 'More' menu button. Otherwise, 'More' menu button is only displayed for overflow and business actions are rendered as inidividual buttons.

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

Default value is true.

Parameters:
booleanbAlwaysShowMoreMenuNew value for property alwaysShowMoreMenu
Returns:
sap.ui.ux3.ActionBarReference to this in order to allow method chaining
setDividerWidth(sDividerWidth): sap.ui.ux3.ActionBar

Sets a new value for property dividerWidth.

The minimum width of ActionBar's the social actions part: business action controls have to be rendered outside this area

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

Parameters:
sap.ui.core.CSSSizesDividerWidthNew value for property dividerWidth
Returns:
sap.ui.ux3.ActionBarReference to this in order to allow method chaining
setFavoriteState(bFavoriteState): sap.ui.ux3.ActionBar

Sets a new value for property favoriteState.

Indicates whether “Favorite” is active

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

Parameters:
booleanbFavoriteStateNew value for property favoriteState
Returns:
sap.ui.ux3.ActionBarReference to this in order to allow method chaining
setFlagState(bFlagState): sap.ui.ux3.ActionBar

Sets a new value for property flagState.

Indicates whether “Mark for Follow Up” is active

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

Parameters:
booleanbFlagStateNew value for property flagState
Returns:
sap.ui.ux3.ActionBarReference to this in order to allow method chaining
setFollowState(sFollowState): sap.ui.ux3.ActionBar

Sets a new value for property followState.

Keeps track of the actionBars Follow/Unfollow button’s state. Its value is one of - FollowActionState.Default - FollowActionState.Follow - FollowActionState.Hold

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

Default value is Default.

Parameters:
sap.ui.ux3.FollowActionStatesFollowStateNew value for property followState
Returns:
sap.ui.ux3.ActionBarReference to this in order to allow method chaining
setShowFavorite(bShowFavorite): sap.ui.ux3.ActionBar

Sets a new value for property showFavorite.

Indicates whether social action “Favorite” is shown, default is ‘true’

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

Default value is true.

Parameters:
booleanbShowFavoriteNew value for property showFavorite
Returns:
sap.ui.ux3.ActionBarReference to this in order to allow method chaining
setShowFlag(bShowFlag): sap.ui.ux3.ActionBar

Sets a new value for property showFlag.

Indicates whether social action “Mark for Follow Up” is shown, default is ‘true’

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

Default value is true.

Parameters:
booleanbShowFlagNew value for property showFlag
Returns:
sap.ui.ux3.ActionBarReference to this in order to allow method chaining
setShowFollow(bShowFollow): sap.ui.ux3.ActionBar

Sets a new value for property showFollow.

Indicates whether social action “Follow” is shown, default is ‘true’

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

Default value is true.

Parameters:
booleanbShowFollowNew value for property showFollow
Returns:
sap.ui.ux3.ActionBarReference to this in order to allow method chaining
setShowOpen(bShowOpen): sap.ui.ux3.ActionBar

Sets a new value for property showOpen.

Indicates whether social action “Open” is shown, default is ‘true’

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

Default value is true.

Parameters:
booleanbShowOpenNew value for property showOpen
Returns:
sap.ui.ux3.ActionBarReference to this in order to allow method chaining
setShowUpdate(bShowUpdate): sap.ui.ux3.ActionBar

Sets a new value for property showUpdate.

Indicates whether social action “Update” is shown, default is ‘true’

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

Default value is true.

Parameters:
booleanbShowUpdateNew value for property showUpdate
Returns:
sap.ui.ux3.ActionBarReference to this in order to allow method chaining
setThingIconURI(sThingIconURI): sap.ui.ux3.ActionBar

Sets a new value for property thingIconURI.

The thing icon uri. Icon will be displayed in Feeder

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

Parameters:
sap.ui.core.URIsThingIconURINew value for property thingIconURI
Returns:
sap.ui.ux3.ActionBarReference to this in order to allow method chaining
setUpdateState(bUpdateState): sap.ui.ux3.ActionBar

Sets a new value for property updateState.

Indicates whether “Update” is active

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

Parameters:
booleanbUpdateStateNew value for property updateState
Returns:
sap.ui.ux3.ActionBarReference to this in order to allow method chaining