Aggregation control for the Legend
Experimental API:Since 1.38.0 This class is experimental and might be modified or removed in future versions.
Event Summary
expand(oControlEvent)Event is fired if the panel is expanded of collapsed itemPress(oControlEvent)Event is fired when an item is pressed unless the item's type property is Inactive. selectionChange(oControlEvent)Event is fired when selection is changed via user interaction inside the control. Method Summary
sap.ui.vk.ListPanel.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.ui.vk.ListPanel with name sClassName and enriches it with the information contained in oClassInfo. addItem(oItem)Adds some item to the aggregation items. attachExpand(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the expand event of this sap.ui.vk.ListPanel. attachHeaderIconPress(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the headerIconPress event of this sap.ui.vk.ListPanel. attachItemPress(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the itemPress event of this sap.ui.vk.ListPanel. attachSelectionChange(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the selectionChange event of this sap.ui.vk.ListPanel. destroyItems()Destroys all the items in the aggregation items. detachExpand(fnFunction, oListener)Detaches event handler fnFunction from the expand event of this sap.ui.vk.ListPanel. detachHeaderIconPress(fnFunction, oListener)Detaches event handler fnFunction from the headerIconPress event of this sap.ui.vk.ListPanel. detachItemPress(fnFunction, oListener)Detaches event handler fnFunction from the itemPress event of this sap.ui.vk.ListPanel. detachSelectionChange(fnFunction, oListener)Detaches event handler fnFunction from the selectionChange event of this sap.ui.vk.ListPanel. fireExpand(mArguments?)Fires event expand to attached listeners. fireItemPress(mArguments?)Fires event itemPress to attached listeners. getItems()Gets content of aggregation items. indexOfItem(oItem)Checks for the provided sap.m.ListItemBase in the aggregation items. insertItem(oItem, iIndex)Inserts a item into the aggregation items. removeItem(vItem)Removes a item from the aggregation items. setExpanded(bExpanded)Sets a new value for property expanded. setHeaderIcon(sHeaderIcon)Sets a new value for property headerIcon. setHeaderText(sHeaderText)Sets a new value for property headerText. setSelectedItem(oListItem, bSelect)Selects or deselects the given list item. addStyleClass,
allowTextSelection,
attachBrowserEvent,
attachValidateFieldGroup,
checkFieldGroupIds,
clone,
detachBrowserEvent,
detachValidateFieldGroup,
fireValidateFieldGroup,
getAccessibilityInfo,
getBusy,
getBusyIndicatorDelay,
getControlsByFieldGroupId,
getFieldGroupIds,
getIdForLabel,
getRenderer,
getVisible,
hasStyleClass,
invalidate,
isBusy,
onAfterRendering,
onBeforeRendering,
placeAt,
removeStyleClass,
rerender,
setBusy,
setBusyIndicatorDelay,
setFieldGroupIds,
setVisible,
toggleStyleClass,
triggerValidateFieldGroup $,
addCustomData,
addDependent,
addEventDelegate,
applyFocusInfo,
bindElement,
data,
destroy,
destroyCustomData,
destroyDependents,
destroyLayoutData,
destroyTooltip,
enhanceAccessibilityState,
exit,
findElements,
fireEvent,
focus,
getCustomData,
getDependents,
getDomRef,
getElementBinding,
getFocusDomRef,
getFocusInfo,
getInterface,
getLayoutData,
getMetadata,
getTooltip,
getTooltip_AsString,
getTooltip_Text,
indexOfCustomData,
indexOfDependent,
init,
insertCustomData,
insertDependent,
prop,
removeAllCustomData,
removeAllDependents,
removeCustomData,
removeDependent,
removeEventDelegate,
setLayoutData,
setTooltip,
toString,
unbindElement addAggregation,
addAssociation,
applySettings,
attachFormatError,
attachModelContextChange,
attachParseError,
attachValidationError,
attachValidationSuccess,
bindAggregation,
bindContext,
bindObject,
bindProperty,
destroyAggregation,
detachFormatError,
detachModelContextChange,
detachParseError,
detachValidationError,
detachValidationSuccess,
findAggregatedObjects,
fireFormatError,
fireModelContextChange,
fireParseError,
fireValidationError,
fireValidationSuccess,
getAggregation,
getAssociation,
getBinding,
getBindingContext,
getBindingInfo,
getBindingPath,
getEventingParent,
getId,
getModel,
getObjectBinding,
getOriginInfo,
getParent,
getProperty,
hasModel,
indexOfAggregation,
insertAggregation,
isBound,
isInvalidateSuppressed,
isTreeBinding,
propagateMessages,
removeAggregation,
removeAllAggregation,
removeAllAssociation,
removeAssociation,
setAggregation,
setAssociation,
setBindingContext,
setModel,
setProperty,
unbindAggregation,
unbindContext,
unbindObject,
unbindProperty,
validateAggregation,
validateProperty Constructor Detail
new sap.ui.vk.ListPanel(sId?, mSettings?)
Constructor for a new ListPanel.
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:
- Properties
- Aggregations
- items : sap.m.ListItemBase[]
- Events
- headerIconPress : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]
- expand : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]
- selectionChange : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]
- itemPress : 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:
| {string} | sId? | id for the new control, generated automatically if no id is given |
| {object} | mSettings? | initial settings for the new control |
Event Detail
expand(oControlEvent)
Event is fired if the panel is expanded of collapsed
Parameters:
headerIconPress(oControlEvent)
Event is fired if the header icon is pressed
Parameters:
itemPress(oControlEvent)
Event is fired when an item is pressed unless the item's type property is Inactive.
Parameters:
selectionChange(oControlEvent)
Event is fired when selection is changed via user interaction inside the control.
Parameters:
| {sap.ui.base.Event} | oControlEvent | |
| {sap.ui.base.EventProvider} | oControlEvent.getSource | |
| {object} | oControlEvent.getParameters | |
| {sap.m.ListItemBase} | oControlEvent.getParameters.listItem | The item whose selection has changed. In MultiSelect mode, only the up-most selected item is returned. This parameter can be used for single-selection modes. |
| {sap.m.ListItemBase[]} | oControlEvent.getParameters.listItems | Array of items whose selection has changed. This parameter can be used for MultiSelect mode. |
| {boolean} | oControlEvent.getParameters.selected | Indicates whether the listItem parameter is selected or not. |
Method Detail
sap.ui.vk.ListPanel.extend(sClassName, oClassInfo?, FNMetaImpl?): function
Creates a new subclass of class sap.ui.vk.ListPanel 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:
| {string} | sClassName | Name of the class being created |
| {object} | oClassInfo? | Object literal with information about the class |
| {function} | FNMetaImpl? | Constructor function for the metadata object; if not given, it defaults to sap.ui.core.ElementMetadata |
Returns:
| {function} | Created class / constructor function |
Returns a metadata object for class sap.ui.vk.ListPanel.
Returns:
Adds some item to the aggregation items.
Parameters:
Returns:
Attaches event handler
fnFunction to the
expand event of this
sap.ui.vk.ListPanel.
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.vk.ListPanel itself.
Event is fired if the panel is expanded of collapsed
Parameters:
| {object} | oData? | An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
| {function} | fnFunction | The function to be called when the event occurs |
| {object} | oListener? | Context object to call the event handler with. Defaults to this sap.ui.vk.ListPanel itself |
Returns:
Attaches event handler
fnFunction to the
headerIconPress event of this
sap.ui.vk.ListPanel.
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.vk.ListPanel itself.
Event is fired if the header icon is pressed
Parameters:
| {object} | oData? | An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
| {function} | fnFunction | The function to be called when the event occurs |
| {object} | oListener? | Context object to call the event handler with. Defaults to this sap.ui.vk.ListPanel itself |
Returns:
Attaches event handler
fnFunction to the
itemPress event of this
sap.ui.vk.ListPanel.
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.vk.ListPanel itself.
Event is fired when an item is pressed unless the item's type property is Inactive.
Parameters:
| {object} | oData? | An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
| {function} | fnFunction | The function to be called when the event occurs |
| {object} | oListener? | Context object to call the event handler with. Defaults to this sap.ui.vk.ListPanel itself |
Returns:
Attaches event handler
fnFunction to the
selectionChange event of this
sap.ui.vk.ListPanel.
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.vk.ListPanel itself.
Event is fired when selection is changed via user interaction inside the control.
Parameters:
| {object} | oData? | An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
| {function} | fnFunction | The function to be called when the event occurs |
| {object} | oListener? | Context object to call the event handler with. Defaults to this sap.ui.vk.ListPanel itself |
Returns:
Destroys all the items in the aggregation items.
Returns:
Detaches event handler
fnFunction from the
expand event of this
sap.ui.vk.ListPanel.
The passed function and listener object must match the ones used for event registration.
Parameters:
| {function} | fnFunction | The function to be called, when the event occurs |
| {object} | oListener | Context object on which the given function had to be called |
Returns:
Detaches event handler
fnFunction from the
headerIconPress event of this
sap.ui.vk.ListPanel.
The passed function and listener object must match the ones used for event registration.
Parameters:
| {function} | fnFunction | The function to be called, when the event occurs |
| {object} | oListener | Context object on which the given function had to be called |
Returns:
Detaches event handler
fnFunction from the
itemPress event of this
sap.ui.vk.ListPanel.
The passed function and listener object must match the ones used for event registration.
Parameters:
| {function} | fnFunction | The function to be called, when the event occurs |
| {object} | oListener | Context object on which the given function had to be called |
Returns:
Detaches event handler
fnFunction from the
selectionChange event of this
sap.ui.vk.ListPanel.
The passed function and listener object must match the ones used for event registration.
Parameters:
| {function} | fnFunction | The function to be called, when the event occurs |
| {object} | oListener | Context object on which the given function had to be called |
Returns:
Fires event expand to attached listeners.
Parameters:
| {Map} | mArguments? | The arguments to pass along with the event |
Returns:
Fires event headerIconPress to attached listeners.
Parameters:
| {Map} | mArguments? | The arguments to pass along with the event |
Returns:
Fires event
itemPress to attached listeners.
Expects the following event parameters:
listItem of type sap.m.ListItemBaseThe item which fired the pressed event.srcControl of type sap.ui.core.ControlThe control which caused the press event within the container.
Parameters:
| {Map} | mArguments? | The arguments to pass along with the event |
Returns:
Fires event
selectionChange to attached listeners.
Expects the following event parameters:
listItem of type sap.m.ListItemBaseThe item whose selection has changed. In MultiSelect mode, only the up-most selected item is returned. This parameter can be used for single-selection modes.listItems of type sap.m.ListItemBase[]Array of items whose selection has changed. This parameter can be used for MultiSelect mode.selected of type booleanIndicates whether the listItem parameter is selected or not.
Parameters:
| {Map} | mArguments? | The arguments to pass along with the event |
Returns:
getExpandAnimation(): boolean
Gets current value of property
expandAnimation.
Expand animation
Default value is true.
Returns:
| {boolean} | Value of property expandAnimation |
getExpanded(): boolean
Gets current value of property
expanded.
Expansion state
Default value is true.
Returns:
| {boolean} | Value of property expanded |
Gets current value of property
headerIcon.
Header icon
Returns:
getHeaderText(): string
Gets current value of property
headerText.
Header text
Returns:
| {string} | Value of property headerText |
Gets content of aggregation
items.
Item aggregation
Returns:
Returns selected list item. When no item is selected, "null" is returned. When "multi-selection" is enabled and multiple items are selected, only the up-most selected item is returned.
Returns:
Returns an array containing the selected list items. If no items are selected, an empty array is returned.
Returns:
Gets current value of property
selectionMode.
Selection Mode
Default value is MultiSelect.
Returns:
indexOfItem(oItem): int
Checks for the provided sap.m.ListItemBase in the aggregation items. and returns its index if found or -1 otherwise.
Parameters:
Returns:
| {int} | The index of the provided control in the aggregation if found, or -1 otherwise |
Inserts a item into the aggregation items.
Parameters:
| {sap.m.ListItemBase} | oItem | the item to insert; if empty, nothing is inserted |
| {int} | iIndex | 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 |
Returns:
Removes all the controls from the aggregation
items.
Additionally, it unregisters them from the hosting UIArea.
Returns:
Removes a item from the aggregation items.
Parameters:
Returns:
Sets a new value for property
expandAnimation.
Expand animation
When called with a value of null or undefined, the default value of the property will be restored.
Default value is true.
Parameters:
| {boolean} | bExpandAnimation | New value for property expandAnimation |
Returns:
Sets a new value for property
expanded.
Expansion state
When called with a value of null or undefined, the default value of the property will be restored.
Default value is true.
Parameters:
| {boolean} | bExpanded | New value for property expanded |
Returns:
Sets a new value for property
headerIcon.
Header icon
When called with a value of null or undefined, the default value of the property will be restored.
Parameters:
Returns:
Sets a new value for property
headerText.
Header text
When called with a value of null or undefined, the default value of the property will be restored.
Parameters:
| {string} | sHeaderText | New value for property headerText |
Returns:
setSelectedItem(oListItem, bSelect)
Selects or deselects the given list item.
Parameters:
| {sap.m.ListItemBase} | oListItem | The list item whose selection to be changed. This parameter is mandatory. |
| {boolean} | bSelect | Sets selected status of the list item. Default value is true. |
Sets a new value for property
selectionMode.
Selection Mode
When called with a value of null or undefined, the default value of the property will be restored.
Default value is MultiSelect.
Parameters:
Returns: