Class sap.m.ListModule: sap/m/List

extends ListBase
known direct subclasses: FacetFilterList, GrowingList, Notes

The List control provides a container for all types of list items. For mobile devices, the recommended limit of list items is 100 to assure proper performance. To improve initial rendering of large lists, use the "growing" feature. Please refer to the SAPUI5 Developer Guide for more information..

Constructor Summary
new sap.m.List(sId?, mSettings?)Constructor for a new List.
Events borrowed from class sap.ui.core.Control
Method Summary
sap.m.List.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.m.List with name sClassName and enriches it with the information contained in oClassInfo.
sap.m.List.getMetadata()Returns a metadata object for class sap.m.List.
getBackgroundDesign()Gets current value of property backgroundDesign.
setBackgroundDesign(sBackgroundDesign)Sets a new value for property backgroundDesign.
addColumn(oColumn)Adds some column to the aggregation columns.
destroyColumns()Destroys all the columns in the aggregation columns.
getColumns()Gets content of aggregation columns.
indexOfColumn(oColumn)Checks for the provided sap.m.Column in the aggregation columns.
insertColumn(oColumn, iIndex)Inserts a column into the aggregation columns.
removeAllColumns()Removes all the controls from the aggregation columns.
removeColumn(vColumn)Removes a column from the aggregation columns.
Methods borrowed from class sap.m.ListBase
addAriaLabelledBy, addItem, attachDelete, attachGrowingFinished, attachGrowingStarted, attachItemPress, attachSelect, attachSelectionChange, attachSwipe, attachUpdateFinished, attachUpdateStarted, bindItems, destroyHeaderToolbar, destroyInfoToolbar, destroyItems, destroySwipeContent, detachDelete, detachGrowingFinished, detachGrowingStarted, detachItemPress, detachSelect, detachSelectionChange, detachSwipe, detachUpdateFinished, detachUpdateStarted, fireDelete, fireGrowingFinished, fireGrowingStarted, fireItemPress, fireSelect, fireSelectionChange, fireSwipe, fireUpdateFinished, fireUpdateStarted, getAriaLabelledBy, getEnableBusyIndicator, getFooterText, getGrowing, getGrowingInfo, getGrowingScrollToLoad, getGrowingThreshold, getGrowingTriggerText, getHeaderDesign, getHeaderText, getHeaderToolbar, getIncludeItemInSelection, getInfoToolbar, getInset, getItemNavigation, getItems, getKeyboardMode, getLastMode, getMode, getModeAnimationOn, getNoDataText, getRememberSelections, getSelectedContexts, getSelectedItem, getSelectedItems, getShowNoData, getShowSeparators, getShowUnread, getSwipeContent, getSwipeDirection, getSwipedItem, getWidth, indexOfItem, insertItem, removeAllAriaLabelledBy, removeAllItems, removeAriaLabelledBy, removeItem, removeSelections, selectAll, setEnableBusyIndicator, setFooterText, setGrowing, setGrowingScrollToLoad, setGrowingThreshold, setGrowingTriggerText, setHeaderDesign, setHeaderText, setHeaderToolbar, setIncludeItemInSelection, setInfoToolbar, setInset, setKeyboardMode, setMode, setModeAnimationOn, setNoDataText, setRememberSelections, setSelectedItem, setSelectedItemById, setShowNoData, setShowSeparators, setShowUnread, setSwipeContent, setSwipeDirection, setWidth, swipeOut, unbindItems
Constructor Detail
new sap.m.List(sId?, mSettings?)
Constructor for a new List.

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:

In addition, all settings applicable to the base type sap.m.ListBase 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
Method Detail
sap.m.List.extend(sClassName, oClassInfo?, FNMetaImpl?): function
Creates a new subclass of class sap.m.List with name sClassName and enriches it with the information contained in oClassInfo.

oClassInfo might contain the same kind of information as described in sap.m.ListBase.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
sap.m.List.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.m.List.
Returns:
{sap.ui.base.Metadata} Metadata object describing this class
getBackgroundDesign(): sap.m.BackgroundDesign
Gets current value of property backgroundDesign.

Sets the background style of the list. Depending on the theme, you can change the state of the background from Solid to Translucent or to Transparent.

Default value is Solid.

Since:
1.14
Returns:
{sap.m.BackgroundDesign} Value of property backgroundDesign
setBackgroundDesign(sBackgroundDesign): sap.m.List
Sets a new value for property backgroundDesign.

Sets the background style of the list. Depending on the theme, you can change the state of the background from Solid to Translucent or to Transparent.

When called with a value of null or undefined, the default value of the property will be restored.

Default value is Solid.

Parameters:
{sap.m.BackgroundDesign}sBackgroundDesign New value for property backgroundDesign
Since:
1.14
Returns:
{sap.m.List} Reference to this in order to allow method chaining
addColumn(oColumn): sap.m.List
Adds some column to the aggregation columns.
Parameters:
{sap.m.Column}oColumn the column to add; if empty, nothing is inserted
Deprecated:
Since version 1.16. Instead, use the sap.m.Table control.
Returns:
{sap.m.List} Reference to this in order to allow method chaining
destroyColumns(): sap.m.List
Destroys all the columns in the aggregation columns.
Deprecated:
Since version 1.16. Instead, use the sap.m.Table control.
Returns:
{sap.m.List} Reference to this in order to allow method chaining
getColumns(): sap.m.Column[]
Gets content of aggregation columns.

Defines columns of the list.

Deprecated:
Since version 1.16. Instead, use the sap.m.Table control.
Returns:
{sap.m.Column[]}
indexOfColumn(oColumn): int
Checks for the provided sap.m.Column in the aggregation columns. and returns its index if found or -1 otherwise.
Parameters:
{sap.m.Column}oColumn The column whose index is looked for
Deprecated:
Since version 1.16. Instead, use the sap.m.Table control.
Returns:
{int} The index of the provided control in the aggregation if found, or -1 otherwise
insertColumn(oColumn, iIndex): sap.m.List
Inserts a column into the aggregation columns.
Parameters:
{sap.m.Column}oColumn the column to insert; if empty, nothing is inserted
{int}iIndex the 0-based index the column should be inserted at; for a negative value of iIndex, the column is inserted at position 0; for a value greater than the current size of the aggregation, the column is inserted at the last position
Deprecated:
Since version 1.16. Instead, use the sap.m.Table control.
Returns:
{sap.m.List} Reference to this in order to allow method chaining
removeAllColumns(): sap.m.Column[]
Removes all the controls from the aggregation columns.

Additionally, it unregisters them from the hosting UIArea.

Deprecated:
Since version 1.16. Instead, use the sap.m.Table control.
Returns:
{sap.m.Column[]} An array of the removed elements (might be empty)
removeColumn(vColumn): sap.m.Column
Removes a column from the aggregation columns.
Parameters:
{int|string|sap.m.Column}vColumn The columnto remove or its index or id
Deprecated:
Since version 1.16. Instead, use the sap.m.Table control.
Returns:
{sap.m.Column} The removed column or null