class sap.m.SelectionDetails

Control sample: sap.m.SelectionDetails
Visiblity: protected
UX Guidelines:
Implements:
Available since: N/A
Module: sap/m/SelectionDetails
Application Component: CA-UI5-SC

The protected control provides a popover that displays the details of the items selected in the chart. This control should only be used in the toolbars of sap.suite.ui.commons.ChartContainer and sap.ui.comp.smartchart.SmartChart controls. Initially, the control is rendered as a button that opens the popup after clicking on it. Note:It is protected and should only be used within the framework itself.


Constructor

Constructor for a new SelectionDetails.

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.m.SelectionDetails(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


Aggregations

Default Aggregation: items

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

Hidden aggregation that contains the button.

_popover 0..1 sap.m.ResponsivePopover

Hidden aggregation that contains the popover.

actionGroups 0..n sap.ui.core.Item

Contains actions that are rendered as a dedicated item. In case an action group is pressed, a navigation should be triggered via navTo method. A maximum of 5 actionGroups is displayed inside the popover, though more can be added to the aggregation.

actions 0..n sap.ui.core.Item

Contains custom actions shown in the responsive toolbar below items on the first page.

items (default) 0..n sap.m.SelectionDetailsItem

Contains items that are displayed on the first page.


Events Overview

Event Description
actionPress

Event is triggered when a custom action is pressed.

beforeClose

Event is triggered before the popover is closed.

beforeOpen

Event is triggered before the popover is open.

navigate

Event is triggered after a list item of sap.m.SelectionDetailsItem is pressed.

actionPress

Event is triggered when a custom action is pressed.

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

The action that has to be processed once the action has been pressed

items sap.m.SelectionDetailsItem

If the action is pressed on one of the items, the parameter contains a reference to the pressed item. If a custom action or action group of the SelectionDetails popover is pressed, this parameter refers to all items

level sap.m.SelectionDetailsActionLevel

The action level of action buttons. The available levels are Item, List and Group

beforeClose

Event is triggered before the popover is closed.

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

beforeOpen

Event is triggered before the popover is open.

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

navigate

Event is triggered after a list item of sap.m.SelectionDetailsItem is pressed.

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

The item on which the action has been pressed. Can be null in case a navigation was done without item context, e.g. action press.

direction string

Direction of the triggered navigation, possible values are "to" and "back".

content sap.ui.core.Control

The content of the currently viewed page that was previously added via sap.m.SelectionDetailsFacade#navTo. This contains the content of the page before the navigation was triggered. Can be null in case of first event triggering.


Methods Overview

Method Description
addAction

Adds some action to the aggregation actions.

addActionGroup

Adds some actionGroup to the aggregation actionGroups.

addItem

Adds some item to the aggregation items.

attachActionPress

Attaches event handler fnFunction to the actionPress event of this sap.m.SelectionDetails.

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.m.SelectionDetails itself.

Event is triggered when a custom action is pressed.

attachBeforeClose

Attaches event handler fnFunction to the beforeClose event of this sap.m.SelectionDetails.

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.m.SelectionDetails itself.

Event is triggered before the popover is closed.

attachBeforeOpen

Attaches event handler fnFunction to the beforeOpen event of this sap.m.SelectionDetails.

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.m.SelectionDetails itself.

Event is triggered before the popover is open.

attachNavigate

Attaches event handler fnFunction to the navigate event of this sap.m.SelectionDetails.

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.m.SelectionDetails itself.

Event is triggered after a list item of sap.m.SelectionDetailsItem is pressed.

attachSelectionHandler

Attaches an event handler to the given listener to react to user selection interaction.

bindItems

Binds aggregation items to model data.

See ManagedObject.bindAggregation for a detailed description of the possible properties of oBindingInfo.

destroyActionGroups

Destroys all the actionGroups in the aggregation actionGroups.

destroyActions

Destroys all the actions in the aggregation actions.

destroyItems

Destroys all the items in the aggregation items.

detachActionPress

Detaches event handler fnFunction from the actionPress event of this sap.m.SelectionDetails.

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

detachBeforeClose

Detaches event handler fnFunction from the beforeClose event of this sap.m.SelectionDetails.

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

detachBeforeOpen

Detaches event handler fnFunction from the beforeOpen event of this sap.m.SelectionDetails.

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

detachNavigate

Detaches event handler fnFunction from the navigate event of this sap.m.SelectionDetails.

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

detachSelectionHandler

Detaches the event which was attached by attachSelectionHandler.

sap.m.SelectionDetails.extend

Creates a new subclass of class sap.m.SelectionDetails 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.

fireActionPress

Fires event actionPress to attached listeners.

fireBeforeClose

Fires event beforeClose to attached listeners.

fireBeforeOpen

Fires event beforeOpen to attached listeners.

fireNavigate

Fires event navigate to attached listeners.

getActionGroups

Gets content of aggregation actionGroups.

Contains actions that are rendered as a dedicated item. In case an action group is pressed, a navigation should be triggered via navTo method. A maximum of 5 actionGroups is displayed inside the popover, though more can be added to the aggregation.

getActions

Gets content of aggregation actions.

Contains custom actions shown in the responsive toolbar below items on the first page.

getFacade

Returns the public facade of the SelectionDetails control for non inner framework usages.

getItems

Gets content of aggregation items.

Contains items that are displayed on the first page.

sap.m.SelectionDetails.getMetadata

Returns a metadata object for class sap.m.SelectionDetails.

indexOfAction

Checks for the provided sap.ui.core.Item in the aggregation actions. and returns its index if found or -1 otherwise.

indexOfActionGroup

Checks for the provided sap.ui.core.Item in the aggregation actionGroups. and returns its index if found or -1 otherwise.

indexOfItem

Checks for the provided sap.m.SelectionDetailsItem in the aggregation items. and returns its index if found or -1 otherwise.

insertAction

Inserts a action into the aggregation actions.

insertActionGroup

Inserts a actionGroup into the aggregation actionGroups.

insertItem

Inserts a item into the aggregation items.

registerSelectionDetailsItemFactory

Method to register the factory function that creates the SelectionDetailsItems. The factory function is called for every selected entry separately with three parameters. First parameter is the display data array for each item out of the selection. Second parameter is the data array for each item out of the selection. Third parameter is the binding context for each item in the selection. This is undefined if no binding is used. Fourth parameter is oData. Can be undefined.

removeAction

Removes a action from the aggregation actions.

removeActionGroup

Removes a actionGroup from the aggregation actionGroups.

removeAllActionGroups

Removes all the controls from the aggregation actionGroups.

Additionally, it unregisters them from the hosting UIArea.

removeAllActions

Removes all the controls from the aggregation actions.

Additionally, it unregisters them from the hosting UIArea.

removeAllItems

Removes all the controls from the aggregation items.

Additionally, it unregisters them from the hosting UIArea.

removeItem

Removes a item from the aggregation items.

setPopoverModal

Sets the popover to modal or non-modal based on the given parameter. This only takes effect on desktop or tablet. Please see the documentation sap.m.ResponsivePopover#modal.

unbindItems

Unbinds aggregation items from model data.

addAction

Adds some action to the aggregation actions.

Param Type DefaultValue Description
oAction sap.ui.core.Item

The action to add; if empty, nothing is inserted

addActionGroup

Adds some actionGroup to the aggregation actionGroups.

Param Type DefaultValue Description
oActionGroup sap.ui.core.Item

The actionGroup to add; if empty, nothing is inserted

addItem

Adds some item to the aggregation items.

Param Type DefaultValue Description
oItem sap.m.SelectionDetailsItem

The item to add; if empty, nothing is inserted

attachActionPress

Attaches event handler fnFunction to the actionPress event of this sap.m.SelectionDetails.

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.m.SelectionDetails itself.

Event is triggered when a custom action 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.m.SelectionDetails itself

attachBeforeClose

Attaches event handler fnFunction to the beforeClose event of this sap.m.SelectionDetails.

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.m.SelectionDetails itself.

Event is triggered before the popover is closed.

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.m.SelectionDetails itself

attachBeforeOpen

Attaches event handler fnFunction to the beforeOpen event of this sap.m.SelectionDetails.

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.m.SelectionDetails itself.

Event is triggered before the popover is open.

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.m.SelectionDetails itself

attachNavigate

Attaches event handler fnFunction to the navigate event of this sap.m.SelectionDetails.

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.m.SelectionDetails itself.

Event is triggered after a list item of sap.m.SelectionDetailsItem 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.m.SelectionDetails itself

attachSelectionHandler

Attaches an event handler to the given listener to react to user selection interaction.

Param Type DefaultValue Description
eventId string

The identifier of the event to listen for

listener object

The object which triggers the event to register on

bindItems

Binds aggregation items to model data.

See ManagedObject.bindAggregation for a detailed description of the possible properties of oBindingInfo.

Param Type DefaultValue Description
oBindingInfo sap.ui.base.ManagedObject.AggregationBindingInfo

The binding information

destroyActionGroups

Destroys all the actionGroups in the aggregation actionGroups.

destroyActions

Destroys all the actions in the aggregation actions.

destroyItems

Destroys all the items in the aggregation items.

detachActionPress

Detaches event handler fnFunction from the actionPress event of this sap.m.SelectionDetails.

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

detachBeforeClose

Detaches event handler fnFunction from the beforeClose event of this sap.m.SelectionDetails.

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

detachBeforeOpen

Detaches event handler fnFunction from the beforeOpen event of this sap.m.SelectionDetails.

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

detachNavigate

Detaches event handler fnFunction from the navigate event of this sap.m.SelectionDetails.

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

detachSelectionHandler

Detaches the event which was attached by attachSelectionHandler.

sap.m.SelectionDetails.extend

Creates a new subclass of class sap.m.SelectionDetails 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

fireActionPress

Fires event actionPress to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

action sap.ui.core.Item

The action that has to be processed once the action has been pressed

items sap.m.SelectionDetailsItem

If the action is pressed on one of the items, the parameter contains a reference to the pressed item. If a custom action or action group of the SelectionDetails popover is pressed, this parameter refers to all items

level sap.m.SelectionDetailsActionLevel

The action level of action buttons. The available levels are Item, List and Group

fireBeforeClose

Fires event beforeClose to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

fireBeforeOpen

Fires event beforeOpen to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

fireNavigate

Fires event navigate to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

item sap.m.SelectionDetailsItem

The item on which the action has been pressed. Can be null in case a navigation was done without item context, e.g. action press.

direction string

Direction of the triggered navigation, possible values are "to" and "back".

content sap.ui.core.Control

The content of the currently viewed page that was previously added via sap.m.SelectionDetailsFacade#navTo. This contains the content of the page before the navigation was triggered. Can be null in case of first event triggering.

getActionGroups

Gets content of aggregation actionGroups.

Contains actions that are rendered as a dedicated item. In case an action group is pressed, a navigation should be triggered via navTo method. A maximum of 5 actionGroups is displayed inside the popover, though more can be added to the aggregation.

getActions

Gets content of aggregation actions.

Contains custom actions shown in the responsive toolbar below items on the first page.

getFacade

Returns the public facade of the SelectionDetails control for non inner framework usages.

getItems

Gets content of aggregation items.

Contains items that are displayed on the first page.

sap.m.SelectionDetails.getMetadata

Returns a metadata object for class sap.m.SelectionDetails.

indexOfAction

Checks for the provided sap.ui.core.Item in the aggregation actions. and returns its index if found or -1 otherwise.

Param Type DefaultValue Description
oAction sap.ui.core.Item

The action whose index is looked for

indexOfActionGroup

Checks for the provided sap.ui.core.Item in the aggregation actionGroups. and returns its index if found or -1 otherwise.

Param Type DefaultValue Description
oActionGroup sap.ui.core.Item

The actionGroup whose index is looked for

indexOfItem

Checks for the provided sap.m.SelectionDetailsItem in the aggregation items. and returns its index if found or -1 otherwise.

Param Type DefaultValue Description
oItem sap.m.SelectionDetailsItem

The item whose index is looked for

insertAction

Inserts a action into the aggregation actions.

Param Type DefaultValue Description
oAction sap.ui.core.Item

The action to insert; if empty, nothing is inserted

iIndex int

The 0-based index the action should be inserted at; for a negative value of iIndex, the action is inserted at position 0; for a value greater than the current size of the aggregation, the action is inserted at the last position

insertActionGroup

Inserts a actionGroup into the aggregation actionGroups.

Param Type DefaultValue Description
oActionGroup sap.ui.core.Item

The actionGroup to insert; if empty, nothing is inserted

iIndex int

The 0-based index the actionGroup should be inserted at; for a negative value of iIndex, the actionGroup is inserted at position 0; for a value greater than the current size of the aggregation, the actionGroup is inserted at the last position

insertItem

Inserts a item into the aggregation items.

Param Type DefaultValue Description
oItem sap.m.SelectionDetailsItem

The item to insert; if empty, nothing is inserted

iIndex int

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

registerSelectionDetailsItemFactory

Method to register the factory function that creates the SelectionDetailsItems. The factory function is called for every selected entry separately with three parameters. First parameter is the display data array for each item out of the selection. Second parameter is the data array for each item out of the selection. Third parameter is the binding context for each item in the selection. This is undefined if no binding is used. Fourth parameter is oData. Can be undefined.

Param Type DefaultValue Description
data any

Data to be passed to the factory function

factory function

The item factory function that returns SelectionDetailsItems

removeAction

Removes a action from the aggregation actions.

Param Type DefaultValue Description
vAction int string sap.ui.core.Item

The action to remove or its index or id

removeActionGroup

Removes a actionGroup from the aggregation actionGroups.

Param Type DefaultValue Description
vActionGroup int string sap.ui.core.Item

The actionGroup to remove or its index or id

removeAllActionGroups

Removes all the controls from the aggregation actionGroups.

Additionally, it unregisters them from the hosting UIArea.

removeAllActions

Removes all the controls from the aggregation actions.

Additionally, it unregisters them from the hosting UIArea.

removeAllItems

Removes all the controls from the aggregation items.

Additionally, it unregisters them from the hosting UIArea.

removeItem

Removes a item from the aggregation items.

Param Type DefaultValue Description
vItem int string sap.m.SelectionDetailsItem

The item to remove or its index or id

setPopoverModal

Sets the popover to modal or non-modal based on the given parameter. This only takes effect on desktop or tablet. Please see the documentation sap.m.ResponsivePopover#modal.

Param Type DefaultValue Description
modal boolean

New value for property modal of the internally used popover.

unbindItems

Unbinds aggregation items from model data.