class sap.m.StandardListItem

Control sample: sap.m.StandardListItem
Visiblity: public
UX Guidelines: Standard List Item
Implements:
Available since: N/A
Module: sap/m/StandardListItem
Application Component: CA-UI5-TBL

sap.m.StandardListItem is a list item providing the most common use cases, e.g. image, title and description.


Constructor

Constructor for a new StandardListItem.

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.m.StandardListItem(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
activeIcon sap.ui.core.URI

Defines the icon that is shown while the list item is pressed.

Visibility: public
adaptTitleSize boolean true

By default, the title size adapts to the available space and gets bigger if the description is empty. If you have list items with and without descriptions, this results in titles with different sizes. In this case, it can be better to switch the size adaption off by setting this property to false.

Since: 1.16.3.

Visibility: public
description string

Defines the additional information for the title. Note: This is only visible when the title property is not empty.

Visibility: public
icon sap.ui.core.URI

Defines the list item icon.

Visibility: public
iconDensityAware boolean true

By default, one or more requests are sent to get the density perfect version of the icon if the given version of the icon doesn't exist on the server. Note: If bandwidth is a key factor for the application, set this value to false.

Visibility: public
iconInset boolean true

Defines the indentation of the icon. If set to false, the icon will not be shown as embedded. Instead it will take the full height of the list item.

Visibility: public
info string

Defines an additional information text. Note: A wrapping of the information text is also supported as of version 1.95, if wrapping=true. Although long strings are supported for the information text, it is recommended to use short strings. For more details, see wrapping.

Visibility: public
infoState sap.ui.core.ValueState None

Defines the state of the information text, e.g. Error, Warning, Success.

Visibility: public
infoStateInverted boolean false

Determines the inverted rendering behavior of the info text and the info state. The color defined by the infoState property is rendered as the background color for the info text, if this property is set to true.

Since: 1.74.

Visibility: public
infoTextDirection sap.ui.core.TextDirection Inherit

Defines the info directionality with enumerated options. By default, the control inherits text direction from the DOM.

Since: 1.28.0.

Visibility: public
title string

Defines the title of the list item.

Visibility: public
titleTextDirection sap.ui.core.TextDirection Inherit

Defines the title text directionality with enumerated options. By default, the control inherits text direction from the DOM.

Since: 1.28.0.

Visibility: public
wrapCharLimit int 0

This property can be used to change the default character limits for the wrapping behavior.

If this property is set to 0, then the default character limit used by the wrapping behavior is used. For details see wrapping.

Note:

0 or a positive integer must be used for this property.

Since: 1.94.

Visibility: public
wrapping boolean false

Defines the wrapping behavior of title and description texts.

Note:

In the desktop mode, initial rendering of the control contains 300 characters along with a button to expand and collapse the text whereas in the phone mode, the character limit is set to 100 characters.
A wrapping of the information text is supported as of 1.95. But expanding and collapsing the information text is not possible. A wrapping of the information text is disabled if infoStateInverted is set to true.

Since: 1.67.

Visibility: public

Borrowed Properties

Name Type Default Value Description
counter int

Defines the counter value of the list items.

Visibility: public
highlight string None

Defines the highlight state of the list items.

Valid values for the highlight property are values of the enumerations sap.ui.core.MessageType or sap.ui.core.IndicationColor.

Accessibility support is provided through the associated highlightText property. If the highlight property is set to a value of sap.ui.core.MessageType, the highlightText property does not need to be set because a default text is used. However, the default text can be overridden by setting the highlightText property. In all other cases the highlightText property must be set.

Since: 1.44.0.

Visibility: public
highlightText string empty string

Defines the semantics of the highlight property for accessibility purposes.

Since: 1.62.

Visibility: public
navigated boolean false

The navigated state of the list item.

If set to true, a navigation indicator is displayed at the end of the list item. Note: This property must be set for one list item only.

Since: 1.72.

Visibility: public
selected boolean false

Defines the selected state of the list items. Note: Binding the selected property in single selection modes may cause unwanted results if you have more than one selected items in your binding.

Visibility: public
type sap.m.ListType Inactive

Defines the visual indication and behavior of the list items, e.g. Active, Navigation, Detail.

Visibility: public
unread boolean false

Activates the unread indicator for the list item, if set to true. Note: This flag is ignored when the showUnread property of the parent is set to false.

Visibility: public
visible boolean true

Whether the control should be visible on the screen. If set to false, a placeholder is rendered instead of the real control.

Visibility: public

Methods Overview

Method Description
sap.m.StandardListItem.extend

Creates a new subclass of class sap.m.StandardListItem 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.ListItemBase.extend.

getActiveIcon

Gets current value of property activeIcon.

Defines the icon that is shown while the list item is pressed.

getAdaptTitleSize

Gets current value of property adaptTitleSize.

By default, the title size adapts to the available space and gets bigger if the description is empty. If you have list items with and without descriptions, this results in titles with different sizes. In this case, it can be better to switch the size adaption off by setting this property to false.

Default value is true.

getDescription

Gets current value of property description.

Defines the additional information for the title. Note: This is only visible when the title property is not empty.

getIcon

Gets current value of property icon.

Defines the list item icon.

getIconDensityAware

Gets current value of property iconDensityAware.

By default, one or more requests are sent to get the density perfect version of the icon if the given version of the icon doesn't exist on the server. Note: If bandwidth is a key factor for the application, set this value to false.

Default value is true.

getIconInset

Gets current value of property iconInset.

Defines the indentation of the icon. If set to false, the icon will not be shown as embedded. Instead it will take the full height of the list item.

Default value is true.

getInfo

Gets current value of property info.

Defines an additional information text. Note: A wrapping of the information text is also supported as of version 1.95, if wrapping=true. Although long strings are supported for the information text, it is recommended to use short strings. For more details, see wrapping.

getInfoState

Gets current value of property infoState.

Defines the state of the information text, e.g. Error, Warning, Success.

Default value is None.

getInfoStateInverted

Gets current value of property infoStateInverted.

Determines the inverted rendering behavior of the info text and the info state. The color defined by the infoState property is rendered as the background color for the info text, if this property is set to true.

Default value is false.

getInfoTextDirection

Gets current value of property infoTextDirection.

Defines the info directionality with enumerated options. By default, the control inherits text direction from the DOM.

Default value is Inherit.

sap.m.StandardListItem.getMetadata

Returns a metadata object for class sap.m.StandardListItem.

getTitle

Gets current value of property title.

Defines the title of the list item.

getTitleTextDirection

Gets current value of property titleTextDirection.

Defines the title text directionality with enumerated options. By default, the control inherits text direction from the DOM.

Default value is Inherit.

getWrapCharLimit

Gets current value of property wrapCharLimit.

This property can be used to change the default character limits for the wrapping behavior.

If this property is set to 0, then the default character limit used by the wrapping behavior is used. For details see wrapping.

Note:

0 or a positive integer must be used for this property.

Default value is 0.

getWrapping

Gets current value of property wrapping.

Defines the wrapping behavior of title and description texts.

Note:

In the desktop mode, initial rendering of the control contains 300 characters along with a button to expand and collapse the text whereas in the phone mode, the character limit is set to 100 characters.
A wrapping of the information text is supported as of 1.95. But expanding and collapsing the information text is not possible. A wrapping of the information text is disabled if infoStateInverted is set to true.

Default value is false.

setActiveIcon

Sets a new value for property activeIcon.

Defines the icon that is shown while the list item is pressed.

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

setAdaptTitleSize

Sets a new value for property adaptTitleSize.

By default, the title size adapts to the available space and gets bigger if the description is empty. If you have list items with and without descriptions, this results in titles with different sizes. In this case, it can be better to switch the size adaption off by setting this property to false.

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

Default value is true.

setDescription

Sets a new value for property description.

Defines the additional information for the title. Note: This is only visible when the title property is not empty.

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

setIcon

Sets a new value for property icon.

Defines the list item icon.

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

setIconDensityAware

Sets a new value for property iconDensityAware.

By default, one or more requests are sent to get the density perfect version of the icon if the given version of the icon doesn't exist on the server. Note: If bandwidth is a key factor for the application, set this value to false.

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

Default value is true.

setIconInset

Sets a new value for property iconInset.

Defines the indentation of the icon. If set to false, the icon will not be shown as embedded. Instead it will take the full height of the list item.

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

Default value is true.

setInfo

Sets a new value for property info.

Defines an additional information text. Note: A wrapping of the information text is also supported as of version 1.95, if wrapping=true. Although long strings are supported for the information text, it is recommended to use short strings. For more details, see wrapping.

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

setInfoState

Sets a new value for property infoState.

Defines the state of the information text, e.g. Error, Warning, Success.

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

Default value is None.

setInfoStateInverted

Sets a new value for property infoStateInverted.

Determines the inverted rendering behavior of the info text and the info state. The color defined by the infoState property is rendered as the background color for the info text, if this property is set to true.

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

Default value is false.

setInfoTextDirection

Sets a new value for property infoTextDirection.

Defines the info directionality with enumerated options. By default, the control inherits text direction from the DOM.

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

Default value is Inherit.

setTitle

Sets a new value for property title.

Defines the title of the list item.

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

setTitleTextDirection

Sets a new value for property titleTextDirection.

Defines the title text directionality with enumerated options. By default, the control inherits text direction from the DOM.

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

Default value is Inherit.

setWrapCharLimit

Sets a new value for property wrapCharLimit.

This property can be used to change the default character limits for the wrapping behavior.

If this property is set to 0, then the default character limit used by the wrapping behavior is used. For details see wrapping.

Note:

0 or a positive integer must be used for this property.

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

Default value is 0.

setWrapping

Sets a new value for property wrapping.

Defines the wrapping behavior of title and description texts.

Note:

In the desktop mode, initial rendering of the control contains 300 characters along with a button to expand and collapse the text whereas in the phone mode, the character limit is set to 100 characters.
A wrapping of the information text is supported as of 1.95. But expanding and collapsing the information text is not possible. A wrapping of the information text is disabled if infoStateInverted is set to true.

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

Default value is false.

sap.m.StandardListItem.extend

Creates a new subclass of class sap.m.StandardListItem 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.ListItemBase.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

getActiveIcon

Gets current value of property activeIcon.

Defines the icon that is shown while the list item is pressed.

getAdaptTitleSize

Gets current value of property adaptTitleSize.

By default, the title size adapts to the available space and gets bigger if the description is empty. If you have list items with and without descriptions, this results in titles with different sizes. In this case, it can be better to switch the size adaption off by setting this property to false.

Default value is true.

getDescription

Gets current value of property description.

Defines the additional information for the title. Note: This is only visible when the title property is not empty.

getIcon

Gets current value of property icon.

Defines the list item icon.

getIconDensityAware

Gets current value of property iconDensityAware.

By default, one or more requests are sent to get the density perfect version of the icon if the given version of the icon doesn't exist on the server. Note: If bandwidth is a key factor for the application, set this value to false.

Default value is true.

getIconInset

Gets current value of property iconInset.

Defines the indentation of the icon. If set to false, the icon will not be shown as embedded. Instead it will take the full height of the list item.

Default value is true.

getInfo

Gets current value of property info.

Defines an additional information text. Note: A wrapping of the information text is also supported as of version 1.95, if wrapping=true. Although long strings are supported for the information text, it is recommended to use short strings. For more details, see wrapping.

getInfoState

Gets current value of property infoState.

Defines the state of the information text, e.g. Error, Warning, Success.

Default value is None.

getInfoStateInverted

Gets current value of property infoStateInverted.

Determines the inverted rendering behavior of the info text and the info state. The color defined by the infoState property is rendered as the background color for the info text, if this property is set to true.

Default value is false.

getInfoTextDirection

Gets current value of property infoTextDirection.

Defines the info directionality with enumerated options. By default, the control inherits text direction from the DOM.

Default value is Inherit.

sap.m.StandardListItem.getMetadata

Returns a metadata object for class sap.m.StandardListItem.

getTitle

Gets current value of property title.

Defines the title of the list item.

getTitleTextDirection

Gets current value of property titleTextDirection.

Defines the title text directionality with enumerated options. By default, the control inherits text direction from the DOM.

Default value is Inherit.

getWrapCharLimit

Gets current value of property wrapCharLimit.

This property can be used to change the default character limits for the wrapping behavior.

If this property is set to 0, then the default character limit used by the wrapping behavior is used. For details see wrapping.

Note:

0 or a positive integer must be used for this property.

Default value is 0.

getWrapping

Gets current value of property wrapping.

Defines the wrapping behavior of title and description texts.

Note:

In the desktop mode, initial rendering of the control contains 300 characters along with a button to expand and collapse the text whereas in the phone mode, the character limit is set to 100 characters.
A wrapping of the information text is supported as of 1.95. But expanding and collapsing the information text is not possible. A wrapping of the information text is disabled if infoStateInverted is set to true.

Default value is false.

setActiveIcon

Sets a new value for property activeIcon.

Defines the icon that is shown while the list item is pressed.

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

Param Type DefaultValue Description
sActiveIcon sap.ui.core.URI

New value for property activeIcon

setAdaptTitleSize

Sets a new value for property adaptTitleSize.

By default, the title size adapts to the available space and gets bigger if the description is empty. If you have list items with and without descriptions, this results in titles with different sizes. In this case, it can be better to switch the size adaption off by setting this property to false.

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
bAdaptTitleSize boolean true

New value for property adaptTitleSize

setDescription

Sets a new value for property description.

Defines the additional information for the title. Note: This is only visible when the title property is not empty.

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

Param Type DefaultValue Description
sDescription string

New value for property description

setIcon

Sets a new value for property icon.

Defines the list item icon.

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

Param Type DefaultValue Description
sIcon sap.ui.core.URI

New value for property icon

setIconDensityAware

Sets a new value for property iconDensityAware.

By default, one or more requests are sent to get the density perfect version of the icon if the given version of the icon doesn't exist on the server. Note: If bandwidth is a key factor for the application, set this value to false.

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
bIconDensityAware boolean true

New value for property iconDensityAware

setIconInset

Sets a new value for property iconInset.

Defines the indentation of the icon. If set to false, the icon will not be shown as embedded. Instead it will take the full height of the list item.

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
bIconInset boolean true

New value for property iconInset

setInfo

Sets a new value for property info.

Defines an additional information text. Note: A wrapping of the information text is also supported as of version 1.95, if wrapping=true. Although long strings are supported for the information text, it is recommended to use short strings. For more details, see wrapping.

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

Param Type DefaultValue Description
sInfo string

New value for property info

setInfoState

Sets a new value for property infoState.

Defines the state of the information text, e.g. Error, Warning, Success.

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

Default value is None.

Param Type DefaultValue Description
sInfoState sap.ui.core.ValueState None

New value for property infoState

setInfoStateInverted

Sets a new value for property infoStateInverted.

Determines the inverted rendering behavior of the info text and the info state. The color defined by the infoState property is rendered as the background color for the info text, if this property is set to true.

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

Default value is false.

Param Type DefaultValue Description
bInfoStateInverted boolean false

New value for property infoStateInverted

setInfoTextDirection

Sets a new value for property infoTextDirection.

Defines the info directionality with enumerated options. By default, the control inherits text direction from the DOM.

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

Default value is Inherit.

Param Type DefaultValue Description
sInfoTextDirection sap.ui.core.TextDirection Inherit

New value for property infoTextDirection

setTitle

Sets a new value for property title.

Defines the title of the list item.

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

Param Type DefaultValue Description
sTitle string

New value for property title

setTitleTextDirection

Sets a new value for property titleTextDirection.

Defines the title text directionality with enumerated options. By default, the control inherits text direction from the DOM.

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

Default value is Inherit.

Param Type DefaultValue Description
sTitleTextDirection sap.ui.core.TextDirection Inherit

New value for property titleTextDirection

setWrapCharLimit

Sets a new value for property wrapCharLimit.

This property can be used to change the default character limits for the wrapping behavior.

If this property is set to 0, then the default character limit used by the wrapping behavior is used. For details see wrapping.

Note:

0 or a positive integer must be used for this property.

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

Default value is 0.

Param Type DefaultValue Description
iWrapCharLimit int 0

New value for property wrapCharLimit

setWrapping

Sets a new value for property wrapping.

Defines the wrapping behavior of title and description texts.

Note:

In the desktop mode, initial rendering of the control contains 300 characters along with a button to expand and collapse the text whereas in the phone mode, the character limit is set to 100 characters.
A wrapping of the information text is supported as of 1.95. But expanding and collapsing the information text is not possible. A wrapping of the information text is disabled if infoStateInverted is set to true.

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

Default value is false.

Param Type DefaultValue Description
bWrapping boolean false

New value for property wrapping