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.
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#constructor for a general description of the syntax of the settings object.
new sap.ui.ux3.ActionBar(sId?, mSettings?)
Param | Type | Default Value | Description |
---|---|---|---|
sId? | string | id for the new control, generated automatically if no id is given |
|
mSettings? | object | initial settings for the new control |
Name | Type | Default Value | Description |
---|---|---|---|
alwaysShowMoreMenu | boolean | true | 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. Visibility: public |
dividerWidth | sap.ui.core.CSSSize | The minimum width of ActionBar's the social actions part: business action controls have to be rendered outside this area Visibility: public |
|
favoriteState | boolean | Indicates whether “Favorite” is active Visibility: public |
|
flagState | boolean | Indicates whether “Mark for Follow Up” is active Visibility: public |
|
followState | sap.ui.ux3.FollowActionState | Default | Keeps track of the actionBars Follow/Unfollow button’s state. Its value is one of - FollowActionState.Default - FollowActionState.Follow - FollowActionState.Hold Visibility: public |
showFavorite | boolean | true | Indicates whether social action “Favorite” is shown, default is ‘true’ Visibility: public |
showFlag | boolean | true | Indicates whether social action “Mark for Follow Up” is shown, default is ‘true’ Visibility: public |
showFollow | boolean | true | Indicates whether social action “Follow” is shown, default is ‘true’ Visibility: public |
showOpen | boolean | true | Indicates whether social action “Open” is shown, default is ‘true’ Visibility: public |
showUpdate | boolean | true | Indicates whether social action “Update” is shown, default is ‘true’ Visibility: public |
thingIconURI | sap.ui.core.URI | The thing icon uri. Icon will be displayed in Feeder Visibility: public |
|
updateState | boolean | Indicates whether “Update” is active Visibility: public |
Default Aggregation:
Name | Cardinality | Type | Description |
---|---|---|---|
_businessActionButtons | 0..n | sap.ui.commons.Button |
Buttons for the business actions - managed by this ActionBar |
_socialActions | 0..n | sap.ui.ux3.ThingAction |
The social actions which are managed by this ActionBar |
businessActions | 0..n | sap.ui.ux3.ThingAction |
Displayed on the actionBar's right hand-side, either as menu item under 'More' or as individual buttons |
Event | Description |
---|---|
actionSelected |
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’ |
feedSubmit |
Fired when a new feed entry is submitted. |
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’
Param | Type | Description |
---|---|---|
oControlEvent | sap.ui.base.Event | |
getSource | sap.ui.base.EventProvider | |
getParameters | object | |
id | string |
Id of selected ThingAction |
action | sap.ui.ux3.ThingAction |
Selected ThingAction |
newState | string |
New State of the selected action.Only filled if the respective action maintains a state property, for example 'FollowUp' or 'Favorite' |
Method | Description |
---|---|
attachActionSelected |
Attaches event handler When called, the context of the event handler (its 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’ |
attachFeedSubmit |
Attaches event handler When called, the context of the event handler (its Fired when a new feed entry is submitted. |
closePopups |
Closes all popups which might be opened as ActionBar children These are the more- and follow menu and the feeder popup |
detachActionSelected |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachFeedSubmit |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
sap.ui.ux3.ActionBar.extend |
Creates a new subclass of class sap.ui.ux3.ActionBar with name
|
fireActionSelected |
Fires event actionSelected to attached listeners. |
fireFeedSubmit |
Fires event feedSubmit to attached listeners. |
getAlwaysShowMoreMenu |
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 |
getBusinessActions |
Gets content of aggregation businessActions. Displayed on the actionBar's right hand-side, either as menu item under 'More' or as individual buttons |
getDividerWidth |
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 |
getFavoriteState |
Gets current value of property favoriteState. Indicates whether “Favorite” is active |
getFlagState |
Gets current value of property flagState. Indicates whether “Mark for Follow Up” is active |
getFollowState |
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 |
sap.ui.ux3.ActionBar.getMetadata |
Returns a metadata object for class sap.ui.ux3.ActionBar. |
getShowFavorite |
Gets current value of property showFavorite. Indicates whether social action “Favorite” is shown, default is ‘true’ Default value is |
getShowFlag |
Gets current value of property showFlag. Indicates whether social action “Mark for Follow Up” is shown, default is ‘true’ Default value is |
getShowFollow |
Gets current value of property showFollow. Indicates whether social action “Follow” is shown, default is ‘true’ Default value is |
getShowOpen |
Gets current value of property showOpen. Indicates whether social action “Open” is shown, default is ‘true’ Default value is |
getShowUpdate |
Gets current value of property showUpdate. Indicates whether social action “Update” is shown, default is ‘true’ Default value is |
getThingIconURI |
Gets current value of property thingIconURI. The thing icon uri. Icon will be displayed in Feeder |
getUpdateState |
Gets current value of property updateState. Indicates whether “Update” is active |
indexOfBusinessAction |
Checks for the provided |
isActive |
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. |
setAlwaysShowMoreMenu |
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 Default value is |
setDividerWidth |
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 |
setFavoriteState |
Sets a new value for property favoriteState. Indicates whether “Favorite” is active When called with a value of |
setFlagState |
Sets a new value for property flagState. Indicates whether “Mark for Follow Up” is active When called with a value of |
setFollowState |
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 Default value is |
setShowFavorite |
Sets a new value for property showFavorite. Indicates whether social action “Favorite” is shown, default is ‘true’ When called with a value of Default value is |
setShowFlag |
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 Default value is |
setShowFollow |
Sets a new value for property showFollow. Indicates whether social action “Follow” is shown, default is ‘true’ When called with a value of Default value is |
setShowOpen |
Sets a new value for property showOpen. Indicates whether social action “Open” is shown, default is ‘true’ When called with a value of Default value is |
setShowUpdate |
Sets a new value for property showUpdate. Indicates whether social action “Update” is shown, default is ‘true’ When called with a value of Default value is |
setThingIconURI |
Sets a new value for property thingIconURI. The thing icon uri. Icon will be displayed in Feeder When called with a value of |
setUpdateState |
Sets a new value for property updateState. Indicates whether “Update” is active When called with a value of |
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’
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 |
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.
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 |
Closes all popups which might be opened as ActionBar children These are the more- and follow menu and the feeder popup
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.
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 |
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.
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 |
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.
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 |
Fires event actionSelected to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
|
id | string |
Id of selected ThingAction |
|
action | sap.ui.ux3.ThingAction |
Selected ThingAction |
|
newState | string |
New State of the selected action.Only filled if the respective action maintains a state property, for example 'FollowUp' or 'Favorite' |
Fires event feedSubmit to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
|
text | string |
Feed text |
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
.
Gets content of aggregation businessActions.
Displayed on the actionBar's right hand-side, either as menu item under 'More' or as individual buttons
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
Gets current value of property favoriteState.
Indicates whether “Favorite” is active
Gets current value of property flagState.
Indicates whether “Mark for Follow Up” is active
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
.
Gets current value of property showFavorite.
Indicates whether social action “Favorite” is shown, default is ‘true’
Default value is true
.
Gets current value of property showFlag.
Indicates whether social action “Mark for Follow Up” is shown, default is ‘true’
Default value is true
.
Gets current value of property showFollow.
Indicates whether social action “Follow” is shown, default is ‘true’
Default value is true
.
Gets current value of property showOpen.
Indicates whether social action “Open” is shown, default is ‘true’
Default value is true
.
Gets current value of property showUpdate.
Indicates whether social action “Update” is shown, default is ‘true’
Default value is true
.
Gets current value of property thingIconURI.
The thing icon uri. Icon will be displayed in Feeder
Checks for the provided sap.ui.ux3.ThingAction
in the aggregation businessActions. and returns its index if found or -1 otherwise.
Param | Type | DefaultValue | Description |
---|---|---|---|
oBusinessAction | sap.ui.ux3.ThingAction |
The businessAction whose index is looked for |
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.
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
.
Param | Type | DefaultValue | Description |
---|---|---|---|
bAlwaysShowMoreMenu | boolean | true |
New value for property |
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.
Param | Type | DefaultValue | Description |
---|---|---|---|
sDividerWidth | sap.ui.core.CSSSize |
New value for property |
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.
Param | Type | DefaultValue | Description |
---|---|---|---|
bFavoriteState | boolean |
New value for property |
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.
Param | Type | DefaultValue | Description |
---|---|---|---|
bFlagState | boolean |
New value for property |
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
.
Param | Type | DefaultValue | Description |
---|---|---|---|
sFollowState | sap.ui.ux3.FollowActionState | Default |
New value for property |
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
.
Param | Type | DefaultValue | Description |
---|---|---|---|
bShowFavorite | boolean | true |
New value for property |
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
.
Param | Type | DefaultValue | Description |
---|---|---|---|
bShowFlag | boolean | true |
New value for property |
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
.
Param | Type | DefaultValue | Description |
---|---|---|---|
bShowFollow | boolean | true |
New value for property |
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
.
Param | Type | DefaultValue | Description |
---|---|---|---|
bShowOpen | boolean | true |
New value for property |
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
.
Param | Type | DefaultValue | Description |
---|---|---|---|
bShowUpdate | boolean | true |
New value for property |
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.
Param | Type | DefaultValue | Description |
---|---|---|---|
sThingIconURI | sap.ui.core.URI |
New value for property |
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.
Param | Type | DefaultValue | Description |
---|---|---|---|
bUpdateState | boolean |
New value for property |