class sap.ui.vk.ListPanel

Control sample: sap.ui.vk.ListPanel
Visiblity: public
UX Guidelines:
Implements:
Available since: N/A
Module: sap/ui/vk/ListPanel
Application Component: CA-UI5-VTK

Aggregation control for the Legend


Constructor

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


Properties

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

Aggregations

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


Events Overview

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 type property is Inactive.

selectionChange

Event is fired when selection is changed via user interaction inside the control.

expand

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

headerIconPress

Event is fired if the header icon is pressed

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

itemPress

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.

selectionChange

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 MultiSelect mode, only the up-most selected item is returned. This parameter can be used for single-selection modes.

listItems sap.m.ListItemBase[]

Array of items whose selection has changed. This parameter can be used for MultiSelect mode.

selected boolean

Indicates whether the listItem parameter is selected or not.


Methods Overview

Method Description
addItem

Adds some item to the aggregation items.

attachExpand

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

attachHeaderIconPress

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

attachItemPress

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.

attachSelectionChange

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.

destroyItems

Destroys all the items in the aggregation items.

detachExpand

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.

detachHeaderIconPress

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.

detachItemPress

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.

detachSelectionChange

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.

sap.ui.vk.ListPanel.extend

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.

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 true.

getExpanded

Gets current value of property expanded.

Expansion state

Default value is true.

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 MultiSelect.

indexOfItem

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

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 null or undefined, the default value of the property will be restored.

Default value is true.

setExpanded

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.

setHeaderIcon

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.

setHeaderText

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.

setSelectedItem

Selects or deselects the given list item.

setSelectionMode

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.

addItem

Adds some item to the aggregation items.

Param Type DefaultValue Description
oItem sap.m.ListItemBase

The item to add; if empty, nothing is inserted

attachExpand

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 sap.ui.vk.ListPanel itself

attachHeaderIconPress

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 sap.ui.vk.ListPanel itself

attachItemPress

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 sap.ui.vk.ListPanel itself

attachSelectionChange

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 sap.ui.vk.ListPanel itself

destroyItems

Destroys all the items in the aggregation items.

detachExpand

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

detachHeaderIconPress

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

detachItemPress

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

detachSelectionChange

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

sap.ui.vk.ListPanel.extend

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

fireExpand

Fires event expand to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

fireHeaderIconPress

Fires event headerIconPress to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

fireItemPress

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.

fireSelectionChange

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 MultiSelect mode, only the up-most selected item is returned. This parameter can be used for single-selection modes.

listItems sap.m.ListItemBase[]

Array of items whose selection has changed. This parameter can be used for MultiSelect mode.

selected boolean

Indicates whether the listItem parameter is selected or not.

getExpandAnimation

Gets current value of property expandAnimation.

Expand animation

Default value is true.

getExpanded

Gets current value of property expanded.

Expansion state

Default value is true.

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 MultiSelect.

indexOfItem

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

insertItem

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 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

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.ListItemBase

The item to remove or its index or id

setExpandAnimation

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 expandAnimation

setExpanded

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 expanded

setHeaderIcon

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 headerIcon

setHeaderText

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 headerText

setSelectedItem

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.

setSelectionMode

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 selectionMode