Class sap.ui.core.ListItemModule: sap/ui/core/ListItem

extends Item

An item that is used in lists or list-similar controls such as DropdownBox, for example. The element foresees the usage of additional texts displayed in a second column.

Constructor Summary
new sap.ui.core.ListItem(sId?, mSettings?)Constructor for a new ListItem.
Method Summary
sap.ui.core.ListItem.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.ui.core.ListItem with name sClassName and enriches it with the information contained in oClassInfo.
sap.ui.core.ListItem.getMetadata()Returns a metadata object for class sap.ui.core.ListItem.
getAdditionalText()Gets current value of property additionalText.
getIcon()Gets current value of property icon.
setAdditionalText(sAdditionalText)Sets a new value for property additionalText.
setIcon(sIcon)Sets a new value for property icon.
Constructor Detail
new sap.ui.core.ListItem(sId?, mSettings?)
Constructor for a new ListItem.

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.ui.core.Item 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.ui.core.ListItem.extend(sClassName, oClassInfo?, FNMetaImpl?): function
Creates a new subclass of class sap.ui.core.ListItem 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.Item.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.ui.core.ListItem.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.ui.core.ListItem.
Returns:
{sap.ui.base.Metadata} Metadata object describing this class
getAdditionalText(): string
Gets current value of property additionalText.

Some additional text of type string, optionally to be displayed along with this item.

Returns:
{string} Value of property additionalText
getIcon(): string
Gets current value of property icon.

The icon belonging to this list item instance. This can be an URI to an image or an icon font URI.

Returns:
{string} Value of property icon
setAdditionalText(sAdditionalText): sap.ui.core.ListItem
Sets a new value for property additionalText.

Some additional text of type string, optionally to be displayed along with this item.

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

Parameters:
{string}sAdditionalText New value for property additionalText
Returns:
{sap.ui.core.ListItem} Reference to this in order to allow method chaining
setIcon(sIcon): sap.ui.core.ListItem
Sets a new value for property icon.

The icon belonging to this list item instance. This can be an URI to an image or an icon font URI.

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

Parameters:
{string}sIcon New value for property icon
Returns:
{sap.ui.core.ListItem} Reference to this in order to allow method chaining