Aggregation control for the Legend
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#constructor for a general description of the syntax of the settings object.
new sap.ui.vk.ListPanel(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 |
---|---|---|---|
expandAnimation | boolean | true | Expand animation Visibility: public |
expanded | boolean | true | Expansion state Visibility: public |
headerIcon | sap.ui.core.URI | Header icon Visibility: public |
|
headerText | string | Header text Visibility: public |
|
selectionMode | sap.m.ListMode | MultiSelect | Selection Mode Visibility: public |
Default Aggregation:
Name | Cardinality | Type | Description |
---|---|---|---|
items | 0..n | sap.m.ListItemBase |
Item aggregation |
panel | 0..1 | sap.m.Panel |
hidden panel aggregation needed for binding |
Event | Description |
---|---|
expand |
Event is fired if the panel is expanded of collapsed |
headerIconPress |
Event is fired if the header icon is pressed |
itemPress |
Event is fired when an item is pressed unless the item's |
selectionChange |
Event is fired when selection is changed via user interaction inside the control. |
Event is fired if the panel is expanded of collapsed
Param | Type | Description |
---|---|---|
oControlEvent | sap.ui.base.Event | |
getSource | sap.ui.base.EventProvider | |
getParameters | object |
Event is fired if the header icon is pressed
Param | Type | Description |
---|---|---|
oControlEvent | sap.ui.base.Event | |
getSource | sap.ui.base.EventProvider | |
getParameters | object |
Event is fired when an item is pressed unless the item's type
property is Inactive
.
Param | Type | Description |
---|---|---|
oControlEvent | sap.ui.base.Event | |
getSource | sap.ui.base.EventProvider | |
getParameters | object | |
listItem | sap.m.ListItemBase |
The item which fired the pressed event. |
srcControl | sap.ui.core.Control |
The control which caused the press event within the container. |
Event is fired when selection is changed via user interaction inside the control.
Param | Type | Description |
---|---|---|
oControlEvent | sap.ui.base.Event | |
getSource | sap.ui.base.EventProvider | |
getParameters | object | |
listItem | sap.m.ListItemBase |
The item whose selection has changed. In |
listItems | sap.m.ListItemBase[] |
Array of items whose selection has changed. This parameter can be used for |
selected | boolean |
Indicates whether the |
Method | Description |
---|---|
addItem |
Adds some item to the aggregation items. |
attachExpand |
Attaches event handler When called, the context of the event handler (its Event is fired if the panel is expanded of collapsed |
attachHeaderIconPress |
Attaches event handler When called, the context of the event handler (its Event is fired if the header icon is pressed |
attachItemPress |
Attaches event handler When called, the context of the event handler (its Event is fired when an item is pressed unless the item's |
attachSelectionChange |
Attaches event handler When called, the context of the event handler (its Event is fired when selection is changed via user interaction inside the control. |
destroyItems |
Destroys all the items in the aggregation items. |
detachExpand |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachHeaderIconPress |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachItemPress |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachSelectionChange |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
sap.ui.vk.ListPanel.extend |
Creates a new subclass of class sap.ui.vk.ListPanel with name
|
fireExpand |
Fires event expand to attached listeners. |
fireHeaderIconPress |
Fires event headerIconPress to attached listeners. |
fireItemPress |
Fires event itemPress to attached listeners. |
fireSelectionChange |
Fires event selectionChange to attached listeners. |
getExpandAnimation |
Gets current value of property expandAnimation. Expand animation Default value is |
getExpanded |
Gets current value of property expanded. Expansion state Default value is |
getHeaderIcon |
Gets current value of property headerIcon. Header icon |
getHeaderText |
Gets current value of property headerText. Header text |
getItems |
Gets content of aggregation items. Item aggregation |
sap.ui.vk.ListPanel.getMetadata |
Returns a metadata object for class sap.ui.vk.ListPanel. |
getSelectedItem |
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. |
getSelectedItems |
Returns an array containing the selected list items. If no items are selected, an empty array is returned. |
getSelectionMode |
Gets current value of property selectionMode. Selection Mode Default value is |
indexOfItem |
Checks for the provided |
insertItem |
Inserts a item into the aggregation items. |
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. |
setExpandAnimation |
Sets a new value for property expandAnimation. Expand animation When called with a value of Default value is |
setExpanded |
Sets a new value for property expanded. Expansion state When called with a value of Default value is |
setHeaderIcon |
Sets a new value for property headerIcon. Header icon When called with a value of |
setHeaderText |
Sets a new value for property headerText. Header text When called with a value of |
setSelectedItem |
Selects or deselects the given list item. |
setSelectionMode |
Sets a new value for property selectionMode. Selection Mode When called with a value of Default value is |
Adds some item to the aggregation items.
Param | Type | DefaultValue | Description |
---|---|---|---|
oItem | sap.m.ListItemBase |
The item to add; if empty, nothing is inserted |
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
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 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
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 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
.
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 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.
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 |
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.
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 headerIconPress event of this sap.ui.vk.ListPanel
.
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 itemPress event of this sap.ui.vk.ListPanel
.
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 selectionChange event of this sap.ui.vk.ListPanel
.
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.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.
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 expand to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
Fires event headerIconPress to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
Fires event itemPress to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
|
listItem | sap.m.ListItemBase |
The item which fired the pressed event. |
|
srcControl | sap.ui.core.Control |
The control which caused the press event within the container. |
Fires event selectionChange to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
|
listItem | sap.m.ListItemBase |
The item whose selection has changed. In |
|
listItems | sap.m.ListItemBase[] |
Array of items whose selection has changed. This parameter can be used for |
|
selected | boolean |
Indicates whether the |
Gets current value of property expandAnimation.
Expand animation
Default value is true
.
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 an array containing the selected list items. If no items are selected, an empty array is returned.
Gets current value of property selectionMode.
Selection Mode
Default value is MultiSelect
.
Checks for the provided sap.m.ListItemBase
in the aggregation items. and returns its index if found or -1 otherwise.
Param | Type | DefaultValue | Description |
---|---|---|---|
oItem | sap.m.ListItemBase |
The item whose index is looked for |
Inserts a item into the aggregation items.
Param | Type | DefaultValue | Description |
---|---|---|---|
oItem | sap.m.ListItemBase |
The item to insert; if empty, nothing is inserted |
|
iIndex | int |
The |
Removes all the controls from the aggregation items.
Additionally, it unregisters them from the hosting UIArea.
Removes a item from the aggregation items.
Param | Type | DefaultValue | Description |
---|---|---|---|
vItem | int string sap.m.ListItemBase |
The item to remove or its index or id |
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
.
Param | Type | DefaultValue | Description |
---|---|---|---|
bExpandAnimation | boolean | true |
New value for property |
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
.
Param | Type | DefaultValue | Description |
---|---|---|---|
bExpanded | boolean | true |
New value for property |
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.
Param | Type | DefaultValue | Description |
---|---|---|---|
sHeaderIcon | sap.ui.core.URI |
New value for property |
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.
Param | Type | DefaultValue | Description |
---|---|---|---|
sHeaderText | string |
New value for property |
Selects or deselects the given list item.
Param | Type | DefaultValue | Description |
---|---|---|---|
oListItem | sap.m.ListItemBase |
The list item whose selection to be changed. This parameter is mandatory. |
|
bSelect | boolean |
Sets selected status of the list item. Default value is true. |
|
bFireEvent | boolean |
Whether to fire the event or not. |
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
.
Param | Type | DefaultValue | Description |
---|---|---|---|
sSelectionMode | sap.m.ListMode | MultiSelect |
New value for property |