class sap.m.DisplayListItem

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

sap.m.DisplayListItem can be used to represent a label and a value.


Constructor

Constructor for a new DisplayListItem.

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.DisplayListItem(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
label string

Defines the label of the list item.

Visibility: public
value string

Defines the value of the list item.

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

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

Since: 1.28.0.

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.DisplayListItem.extend

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

getLabel

Gets current value of property label.

Defines the label of the list item.

sap.m.DisplayListItem.getMetadata

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

getValue

Gets current value of property value.

Defines the value of the list item.

getValueTextDirection

Gets current value of property valueTextDirection.

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

Default value is Inherit.

setLabel

Sets a new value for property label.

Defines the label of the list item.

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

setValue

Sets a new value for property value.

Defines the value of the list item.

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

setValueTextDirection

Sets a new value for property valueTextDirection.

Defines the value 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.

sap.m.DisplayListItem.extend

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

getLabel

Gets current value of property label.

Defines the label of the list item.

sap.m.DisplayListItem.getMetadata

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

getValue

Gets current value of property value.

Defines the value of the list item.

getValueTextDirection

Gets current value of property valueTextDirection.

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

Default value is Inherit.

setLabel

Sets a new value for property label.

Defines the label 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
sLabel string

New value for property label

setValue

Sets a new value for property value.

Defines the value 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
sValue string

New value for property value

setValueTextDirection

Sets a new value for property valueTextDirection.

Defines the value 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
sValueTextDirection sap.ui.core.TextDirection Inherit

New value for property valueTextDirection