Class sap.m.SelectionDetailsModule: sap/m/SelectionDetails

extends Control

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 suite.ui.commons.ChartContainer toolbar 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 ony be used within the framework itself.
Since: 1.48.0.
Constructor Summary
new sap.m.SelectionDetails(sId?, mSettings?)Constructor for a new SelectionDetails.
Event Summary
actionPress(oControlEvent)Event is triggered when a custom action is pressed.
beforeClose(oControlEvent)Event is triggered before the popover is closed.
beforeOpen(oControlEvent)Event is triggered before the popover is open.
navigate(oControlEvent)Event is triggered after a list item of sap.m.SelectionDetailsItem is pressed.
Events borrowed from class sap.ui.core.Control
Method Summary
sap.m.SelectionDetails.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.m.SelectionDetails with name sClassName and enriches it with the information contained in oClassInfo.
sap.m.SelectionDetails.getMetadata()Returns a metadata object for class sap.m.SelectionDetails.
addAction(oAction)Adds some action to the aggregation actions.
addActionGroup(oActionGroup)Adds some actionGroup to the aggregation actionGroups.
addItem(oItem)Adds some item to the aggregation items.
attachActionPress(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the actionPress event of this sap.m.SelectionDetails.
attachBeforeClose(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the beforeClose event of this sap.m.SelectionDetails.
attachBeforeOpen(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the beforeOpen event of this sap.m.SelectionDetails.
attachNavigate(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the navigate event of this sap.m.SelectionDetails.
attachSelectionHandler(eventId, listener)Attaches an event handler to the given listener to react to user selection interaction.
bindItems(oBindingInfo)Binds aggregation items to model data.
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(fnFunction, oListener)Detaches event handler fnFunction from the actionPress event of this sap.m.SelectionDetails.
detachBeforeClose(fnFunction, oListener)Detaches event handler fnFunction from the beforeClose event of this sap.m.SelectionDetails.
detachBeforeOpen(fnFunction, oListener)Detaches event handler fnFunction from the beforeOpen event of this sap.m.SelectionDetails.
detachNavigate(fnFunction, oListener)Detaches event handler fnFunction from the navigate event of this sap.m.SelectionDetails.
detachSelectionHandler()Detaches the event which was attached by attachSelectionHandler.
fireActionPress(mParameters?)Fires event actionPress to attached listeners.
fireBeforeClose(mParameters?)Fires event beforeClose to attached listeners.
fireBeforeOpen(mParameters?)Fires event beforeOpen to attached listeners.
fireNavigate(mParameters?)Fires event navigate to attached listeners.
getActionGroups()Gets content of aggregation actionGroups.
getActions()Gets content of aggregation actions.
getFacade()Returns the public facade of the SelectionDetails control for non inner framework usages.
getItems()Gets content of aggregation items.
indexOfAction(oAction)Checks for the provided sap.ui.core.Item in the aggregation actions.
indexOfActionGroup(oActionGroup)Checks for the provided sap.ui.core.Item in the aggregation actionGroups.
indexOfItem(oItem)Checks for the provided sap.m.SelectionDetailsItem in the aggregation items.
insertAction(oAction, iIndex)Inserts a action into the aggregation actions.
insertActionGroup(oActionGroup, iIndex)Inserts a actionGroup into the aggregation actionGroups.
insertItem(oItem, iIndex)Inserts a item into the aggregation items.
registerSelectionDetailsItemFactory(data, factory)Method to register the factory function that creates the SelectionDetailsItems.
removeAction(vAction)Removes a action from the aggregation actions.
removeActionGroup(vActionGroup)Removes a actionGroup from the aggregation actionGroups.
removeAllActionGroups()Removes all the controls from the aggregation actionGroups.
removeAllActions()Removes all the controls from the aggregation actions.
removeAllItems()Removes all the controls from the aggregation items.
removeItem(vItem)Removes a item from the aggregation items.
setPopoverModal(modal)Sets the popover to modal or non-modal based on the given parameter.
unbindItems()Unbinds aggregation items from model data.
Constructor Detail
new sap.m.SelectionDetails(sId?, mSettings?)

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 for a general description of the syntax of the settings object.

The supported settings are:

  • Aggregations

  • Events

    • beforeOpen : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]
    • beforeClose : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]
    • navigate : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]
    • actionPress : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]

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
actionPress(oControlEvent)
Event is triggered when a custom action is pressed.
Parameters:
sap.ui.base.EventoControlEvent
sap.ui.base.EventProvideroControlEvent.getSource
objectoControlEvent.getParameters
sap.ui.core.ItemoControlEvent.getParameters.actionThe action that has to be processed once the action has been pressed
sap.m.SelectionDetailsItemoControlEvent.getParameters.itemsIf 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
sap.m.SelectionDetailsActionLeveloControlEvent.getParameters.levelThe action level of action buttons. The available levels are Item, List and Group
beforeClose(oControlEvent)
Event is triggered before the popover is closed.
Parameters:
sap.ui.base.EventoControlEvent
sap.ui.base.EventProvideroControlEvent.getSource
objectoControlEvent.getParameters
beforeOpen(oControlEvent)
Event is triggered before the popover is open.
Parameters:
sap.ui.base.EventoControlEvent
sap.ui.base.EventProvideroControlEvent.getSource
objectoControlEvent.getParameters
navigate(oControlEvent)
Event is triggered after a list item of sap.m.SelectionDetailsItem is pressed.
Parameters:
sap.ui.base.EventoControlEvent
sap.ui.base.EventProvideroControlEvent.getSource
objectoControlEvent.getParameters
sap.m.SelectionDetailsItemoControlEvent.getParameters.itemThe item on which the action has been pressed. Can be null in case a navigation was done without item context, e.g. action press.
stringoControlEvent.getParameters.directionDirection of the triggered navigation, possible values are "to" and "back".
sap.ui.core.ControloControlEvent.getParameters.contentThe content of the currently viewed page that was previously added via sap.m.SelectionDetails#navTo. This contains the content of the page before the navigation was triggered. Can be null in case of first event triggering.
Method Detail
sap.m.SelectionDetails.extend(sClassName, oClassInfo?, FNMetaImpl?): function

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.

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.m.SelectionDetails.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.m.SelectionDetails.
Returns:
sap.ui.base.MetadataMetadata object describing this class
addAction(oAction): sap.m.SelectionDetails
Adds some action to the aggregation actions.
Parameters:
sap.ui.core.ItemoActionthe action to add; if empty, nothing is inserted
Returns:
sap.m.SelectionDetailsReference to this in order to allow method chaining
addActionGroup(oActionGroup): sap.m.SelectionDetails
Adds some actionGroup to the aggregation actionGroups.
Parameters:
sap.ui.core.ItemoActionGroupthe actionGroup to add; if empty, nothing is inserted
Returns:
sap.m.SelectionDetailsReference to this in order to allow method chaining
addItem(oItem): sap.m.SelectionDetails
Adds some item to the aggregation items.
Parameters:
sap.m.SelectionDetailsItemoItemthe item to add; if empty, nothing is inserted
Returns:
sap.m.SelectionDetailsReference to this in order to allow method chaining
attachActionPress(oData?, fnFunction, oListener?): sap.m.SelectionDetails

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.

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.m.SelectionDetails itself
Returns:
sap.m.SelectionDetailsReference to this in order to allow method chaining
attachBeforeClose(oData?, fnFunction, oListener?): sap.m.SelectionDetails

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.

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.m.SelectionDetails itself
Returns:
sap.m.SelectionDetailsReference to this in order to allow method chaining
attachBeforeOpen(oData?, fnFunction, oListener?): sap.m.SelectionDetails

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.

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.m.SelectionDetails itself
Returns:
sap.m.SelectionDetailsReference to this in order to allow method chaining
attachNavigate(oData?, fnFunction, oListener?): sap.m.SelectionDetails

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.

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.m.SelectionDetails itself
Returns:
sap.m.SelectionDetailsReference to this in order to allow method chaining
attachSelectionHandler(eventId, listener): sap.m.SelectionDetails
Attaches an event handler to the given listener to react to user selection interaction.
Parameters:
stringeventIdThe identifier of the event to listen for
objectlistenerThe object which triggers the event to register on
Returns:
sap.m.SelectionDetailsthis to allow method chaining
bindItems(oBindingInfo): sap.m.SelectionDetails

Binds aggregation items to model data.

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

Parameters:
objectoBindingInfoThe binding information
Returns:
sap.m.SelectionDetailsReference to this in order to allow method chaining
destroyActionGroups(): sap.m.SelectionDetails
Destroys all the actionGroups in the aggregation actionGroups.
Returns:
sap.m.SelectionDetailsReference to this in order to allow method chaining
destroyActions(): sap.m.SelectionDetails
Destroys all the actions in the aggregation actions.
Returns:
sap.m.SelectionDetailsReference to this in order to allow method chaining
destroyItems(): sap.m.SelectionDetails
Destroys all the items in the aggregation items.
Returns:
sap.m.SelectionDetailsReference to this in order to allow method chaining
detachActionPress(fnFunction, oListener): sap.m.SelectionDetails

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.

Parameters:
functionfnFunctionThe function to be called, when the event occurs
objectoListenerContext object on which the given function had to be called
Returns:
sap.m.SelectionDetailsReference to this in order to allow method chaining
detachBeforeClose(fnFunction, oListener): sap.m.SelectionDetails

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.

Parameters:
functionfnFunctionThe function to be called, when the event occurs
objectoListenerContext object on which the given function had to be called
Returns:
sap.m.SelectionDetailsReference to this in order to allow method chaining
detachBeforeOpen(fnFunction, oListener): sap.m.SelectionDetails

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.

Parameters:
functionfnFunctionThe function to be called, when the event occurs
objectoListenerContext object on which the given function had to be called
Returns:
sap.m.SelectionDetailsReference to this in order to allow method chaining
detachNavigate(fnFunction, oListener): sap.m.SelectionDetails

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.

Parameters:
functionfnFunctionThe function to be called, when the event occurs
objectoListenerContext object on which the given function had to be called
Returns:
sap.m.SelectionDetailsReference to this in order to allow method chaining
detachSelectionHandler(): sap.m.SelectionDetails
Detaches the event which was attached by attachSelectionHandler.
Returns:
sap.m.SelectionDetailsthis to allow method chaining
fireActionPress(mParameters?): sap.m.SelectionDetails
Fires event actionPress to attached listeners.
Parameters:
objectmParameters?Parameters to pass along with the event
sap.ui.core.ItemmParameters.action?The action that has to be processed once the action has been pressed
sap.m.SelectionDetailsItemmParameters.items?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
sap.m.SelectionDetailsActionLevelmParameters.level?The action level of action buttons. The available levels are Item, List and Group
Returns:
sap.m.SelectionDetailsReference to this in order to allow method chaining
fireBeforeClose(mParameters?): sap.m.SelectionDetails
Fires event beforeClose to attached listeners.
Parameters:
objectmParameters?Parameters to pass along with the event
Returns:
sap.m.SelectionDetailsReference to this in order to allow method chaining
fireBeforeOpen(mParameters?): sap.m.SelectionDetails
Fires event beforeOpen to attached listeners.
Parameters:
objectmParameters?Parameters to pass along with the event
Returns:
sap.m.SelectionDetailsReference to this in order to allow method chaining
fireNavigate(mParameters?): sap.m.SelectionDetails
Fires event navigate to attached listeners.
Parameters:
objectmParameters?Parameters to pass along with the event
sap.m.SelectionDetailsItemmParameters.item?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.
stringmParameters.direction?Direction of the triggered navigation, possible values are "to" and "back".
sap.ui.core.ControlmParameters.content?The content of the currently viewed page that was previously added via sap.m.SelectionDetails#navTo. This contains the content of the page before the navigation was triggered. Can be null in case of first event triggering.
Returns:
sap.m.SelectionDetailsReference to this in order to allow method chaining
getActionGroups(): sap.ui.core.Item[]

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.

Returns:
sap.ui.core.Item[]
getActions(): sap.ui.core.Item[]

Gets content of aggregation actions.

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

Returns:
sap.ui.core.Item[]
getFacade(): sap.ui.base.Interface
Returns the public facade of the SelectionDetails control for non inner framework usages.
Returns:
sap.ui.base.InterfaceThe reduced facade for outer framework usages.

Gets content of aggregation items.

Contains items that are displayed on the first page.

Returns:
sap.m.SelectionDetailsItem[]
indexOfAction(oAction): int
Checks for the provided sap.ui.core.Item in the aggregation actions. and returns its index if found or -1 otherwise.
Parameters:
sap.ui.core.ItemoActionThe action whose index is looked for
Returns:
intThe index of the provided control in the aggregation if found, or -1 otherwise
indexOfActionGroup(oActionGroup): int
Checks for the provided sap.ui.core.Item in the aggregation actionGroups. and returns its index if found or -1 otherwise.
Parameters:
sap.ui.core.ItemoActionGroupThe actionGroup whose index is looked for
Returns:
intThe index of the provided control in the aggregation if found, or -1 otherwise
indexOfItem(oItem): int
Checks for the provided sap.m.SelectionDetailsItem in the aggregation items. and returns its index if found or -1 otherwise.
Parameters:
sap.m.SelectionDetailsItemoItemThe item whose index is looked for
Returns:
intThe index of the provided control in the aggregation if found, or -1 otherwise
insertAction(oAction, iIndex): sap.m.SelectionDetails
Inserts a action into the aggregation actions.
Parameters:
sap.ui.core.ItemoActionthe action to insert; if empty, nothing is inserted
intiIndexthe 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
Returns:
sap.m.SelectionDetailsReference to this in order to allow method chaining
insertActionGroup(oActionGroup, iIndex): sap.m.SelectionDetails
Inserts a actionGroup into the aggregation actionGroups.
Parameters:
sap.ui.core.ItemoActionGroupthe actionGroup to insert; if empty, nothing is inserted
intiIndexthe 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
Returns:
sap.m.SelectionDetailsReference to this in order to allow method chaining
insertItem(oItem, iIndex): sap.m.SelectionDetails
Inserts a item into the aggregation items.
Parameters:
sap.m.SelectionDetailsItemoItemthe item to insert; if empty, nothing is inserted
intiIndexthe 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
Returns:
sap.m.SelectionDetailsReference to this in order to allow method chaining
registerSelectionDetailsItemFactory(data, factory): sap.m.SelectionDetails
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.
Parameters:
anydataData to be passed to the factory function
functionfactoryThe item factory function that returns SelectionDetailsItems
Returns:
sap.m.SelectionDetailsthis to allow method chaining
removeAction(vAction): sap.ui.core.Item
Removes a action from the aggregation actions.
Parameters:
int|string|sap.ui.core.ItemvActionThe action to remove or its index or id
Returns:
sap.ui.core.ItemThe removed action or null
removeActionGroup(vActionGroup): sap.ui.core.Item
Removes a actionGroup from the aggregation actionGroups.
Parameters:
int|string|sap.ui.core.ItemvActionGroupThe actionGroup to remove or its index or id
Returns:
sap.ui.core.ItemThe removed actionGroup or null
removeAllActionGroups(): sap.ui.core.Item[]

Removes all the controls from the aggregation actionGroups.

Additionally, it unregisters them from the hosting UIArea.

Returns:
sap.ui.core.Item[]An array of the removed elements (might be empty)
removeAllActions(): sap.ui.core.Item[]

Removes all the controls from the aggregation actions.

Additionally, it unregisters them from the hosting UIArea.

Returns:
sap.ui.core.Item[]An array of the removed elements (might be empty)
removeAllItems(): sap.m.SelectionDetailsItem[]

Removes all the controls from the aggregation items.

Additionally, it unregisters them from the hosting UIArea.

Returns:
sap.m.SelectionDetailsItem[]An array of the removed elements (might be empty)
removeItem(vItem): sap.m.SelectionDetailsItem
Removes a item from the aggregation items.
Parameters:
int|string|sap.m.SelectionDetailsItemvItemThe item to remove or its index or id
Returns:
sap.m.SelectionDetailsItemThe removed item or null
setPopoverModal(modal): sap.m.SelectionDetails
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.
Parameters:
booleanmodalNew value for property modal of the internally used popover.
Returns:
sap.m.SelectionDetailsTo ensure method chaining, return the SelectionDetails.
unbindItems(): sap.m.SelectionDetails
Unbinds aggregation items from model data.
Returns:
sap.m.SelectionDetailsReference to this in order to allow method chaining