Class sap.m.ObjectListItemModule: sap/m/ObjectListItem

extends ListItemBase

ObjectListItem is a display control that provides summary information about an object as a list item. The ObjectListItem title is the key identifier of the object. Additional text and icons can be used to further distinguish it from other objects. Attributes and statuses can be used to provide additional meaning about the object to the user.


Since: 1.12.
Constructor Summary
new sap.m.ObjectListItem(sId?, mSettings?)Constructor for a new ObjectListItem.
Fields borrowed from class sap.m.ListItemBase
Events borrowed from class sap.m.ListItemBase
Events borrowed from class sap.ui.core.Control
Method Summary
sap.m.ObjectListItem.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.m.ObjectListItem with name sClassName and enriches it with the information contained in oClassInfo.
sap.m.ObjectListItem.getMetadata()Returns a metadata object for class sap.m.ObjectListItem.
addAttribute(oAttribute)Adds some attribute to the aggregation attributes.
destroyAttributes()Destroys all the attributes in the aggregation attributes.
destroyFirstStatus()Destroys the firstStatus in the aggregation firstStatus.
destroySecondStatus()Destroys the secondStatus in the aggregation secondStatus.
getActiveIcon()Gets current value of property activeIcon.
getAttributes()Gets content of aggregation attributes.
getFirstStatus()Gets content of aggregation firstStatus.
getIcon()Gets current value of property icon.
getIconDensityAware()Gets current value of property iconDensityAware.
getIntro()Gets current value of property intro.
getIntroTextDirection()Gets current value of property introTextDirection.
getMarkFavorite()Gets current value of property markFavorite.
getMarkFlagged()Gets current value of property markFlagged.
getMarkLocked()Gets current value of property markLocked.
getNumber()Gets current value of property number.
getNumberState()Gets current value of property numberState.
getNumberTextDirection()Gets current value of property numberTextDirection.
getNumberUnit()Gets current value of property numberUnit.
getSecondStatus()Gets content of aggregation secondStatus.
getShowMarkers()Gets current value of property showMarkers.
getTitle()Gets current value of property title.
getTitleTextDirection()Gets current value of property titleTextDirection.
indexOfAttribute(oAttribute)Checks for the provided sap.m.ObjectAttribute in the aggregation attributes.
insertAttribute(oAttribute, iIndex)Inserts a attribute into the aggregation attributes.
removeAllAttributes()Removes all the controls from the aggregation attributes.
removeAttribute(vAttribute)Removes a attribute from the aggregation attributes.
setActiveIcon(sActiveIcon)Sets a new value for property activeIcon.
setFirstStatus(oFirstStatus)Sets the aggregated firstStatus.
setIcon(sIcon)Sets a new value for property icon.
setIconDensityAware(bIconDensityAware)Sets a new value for property iconDensityAware.
setIntro(sIntro)Sets a new value for property intro.
setIntroTextDirection(sIntroTextDirection)Sets a new value for property introTextDirection.
setMarkFavorite(bMarkFavorite)Sets a new value for property markFavorite.
setMarkFlagged(bMarkFlagged)Sets a new value for property markFlagged.
setMarkLocked(bMarkLocked)Sets a new value for property markLocked.
setNumber(sNumber)Sets a new value for property number.
setNumberState(sNumberState)Sets a new value for property numberState.
setNumberTextDirection(sNumberTextDirection)Sets a new value for property numberTextDirection.
setNumberUnit(sNumberUnit)Sets a new value for property numberUnit.
setSecondStatus(oSecondStatus)Sets the aggregated secondStatus.
setShowMarkers(bShowMarkers)Sets a new value for property showMarkers.
setTitle(sTitle)Sets a new value for property title.
setTitleTextDirection(sTitleTextDirection)Sets a new value for property titleTextDirection.
Constructor Detail
new sap.m.ObjectListItem(sId?, mSettings?)
Constructor for a new ObjectListItem.

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.ListItemBase 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.ObjectListItem.extend(sClassName, oClassInfo?, FNMetaImpl?): function
Creates a new subclass of class sap.m.ObjectListItem 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.

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.ObjectListItem.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.m.ObjectListItem.
Returns:
{sap.ui.base.Metadata} Metadata object describing this class
addAttribute(oAttribute): sap.m.ObjectListItem
Adds some attribute to the aggregation attributes.
Parameters:
{sap.m.ObjectAttribute}oAttribute the attribute to add; if empty, nothing is inserted
Returns:
{sap.m.ObjectListItem} Reference to this in order to allow method chaining
destroyAttributes(): sap.m.ObjectListItem
Destroys all the attributes in the aggregation attributes.
Returns:
{sap.m.ObjectListItem} Reference to this in order to allow method chaining
destroyFirstStatus(): sap.m.ObjectListItem
Destroys the firstStatus in the aggregation firstStatus.
Returns:
{sap.m.ObjectListItem} Reference to this in order to allow method chaining
destroySecondStatus(): sap.m.ObjectListItem
Destroys the secondStatus in the aggregation secondStatus.
Returns:
{sap.m.ObjectListItem} Reference to this in order to allow method chaining
getActiveIcon(): sap.ui.core.URI
Gets current value of property activeIcon.

Icon displayed when the ObjectListItem is active.

Returns:
{sap.ui.core.URI} Value of property activeIcon
getAttributes(): sap.m.ObjectAttribute[]
Gets content of aggregation attributes.

List of attributes displayed below the title to the left of the status fields.

Returns:
{sap.m.ObjectAttribute[]}
getFirstStatus(): sap.m.ObjectStatus
Gets content of aggregation firstStatus.

First status text field displayed on the right side of the attributes.

Returns:
{sap.m.ObjectStatus}
getIcon(): sap.ui.core.URI
Gets current value of property icon.

ObjectListItem icon displayed to the left of the title.

Returns:
{sap.ui.core.URI} Value of property icon
getIconDensityAware(): boolean
Gets current value of property iconDensityAware.

By default, this is set to true but then one or more requests are sent trying to get the density perfect version of image (in case this version of image dоesn't exist on the server).

If bandwidth is key for the application, set this value to false.

Default value is true.

Returns:
{boolean} Value of property iconDensityAware
getIntro(): string
Gets current value of property intro.

Defines the introductory text for the ObjectListItem.

Returns:
{string} Value of property intro
getIntroTextDirection(): sap.ui.core.TextDirection
Gets current value of property introTextDirection.

Determines the text direction of the item intro. Available options for the intro direction are LTR (left-to-right) and RTL (right-to-left). By default the item intro inherits the text direction from its parent.

Default value is Inherit.

Returns:
{sap.ui.core.TextDirection} Value of property introTextDirection
getMarkFavorite(): boolean
Gets current value of property markFavorite.

Sets the favorite state for the ObjectListItem.

Since:
1.16.0
Returns:
{boolean} Value of property markFavorite
getMarkFlagged(): boolean
Gets current value of property markFlagged.

Sets the flagged state for the ObjectListItem.

Since:
1.16.0
Returns:
{boolean} Value of property markFlagged
getMarkLocked(): boolean
Gets current value of property markLocked.

Sets the locked state of the ObjectListItem.

Default value is false.

Since:
1.28
Returns:
{boolean} Value of property markLocked
getNumber(): string
Gets current value of property number.

Defines the ObjectListItem number.

Returns:
{string} Value of property number
getNumberState(): sap.ui.core.ValueState
Gets current value of property numberState.

Defines the ObjectListItem number and numberUnit value state.

Default value is None.

Since:
1.16.0
Returns:
{sap.ui.core.ValueState} Value of property numberState
getNumberTextDirection(): sap.ui.core.TextDirection
Gets current value of property numberTextDirection.

Determines the text direction of the item number. Available options for the number direction are LTR (left-to-right) and RTL (right-to-left). By default the item number inherits the text direction from its parent.

Default value is Inherit.

Returns:
{sap.ui.core.TextDirection} Value of property numberTextDirection
getNumberUnit(): string
Gets current value of property numberUnit.

Defines the number units qualifier of the ObjectListItem.

Returns:
{string} Value of property numberUnit
getSecondStatus(): sap.m.ObjectStatus
Gets content of aggregation secondStatus.

Second status text field displayed on the right side of the attributes.

Returns:
{sap.m.ObjectStatus}
getShowMarkers(): boolean
Gets current value of property showMarkers.

If set to true, the ObjectListItem can be marked with icons such as favorite and flag.

Since:
1.16.0
Returns:
{boolean} Value of property showMarkers
getTitle(): string
Gets current value of property title.

Defines the ObjectListItem title.

Returns:
{string} Value of property title
getTitleTextDirection(): sap.ui.core.TextDirection
Gets current value of property titleTextDirection.

Determines the text direction of the item title. Available options for the title direction are LTR (left-to-right) and RTL (right-to-left). By default the item title inherits the text direction from its parent.

Default value is Inherit.

Returns:
{sap.ui.core.TextDirection} Value of property titleTextDirection
indexOfAttribute(oAttribute): int
Checks for the provided sap.m.ObjectAttribute in the aggregation attributes. and returns its index if found or -1 otherwise.
Parameters:
{sap.m.ObjectAttribute}oAttribute The attribute whose index is looked for
Returns:
{int} The index of the provided control in the aggregation if found, or -1 otherwise
insertAttribute(oAttribute, iIndex): sap.m.ObjectListItem
Inserts a attribute into the aggregation attributes.
Parameters:
{sap.m.ObjectAttribute}oAttribute the attribute to insert; if empty, nothing is inserted
{int}iIndex the 0-based index the attribute should be inserted at; for a negative value of iIndex, the attribute is inserted at position 0; for a value greater than the current size of the aggregation, the attribute is inserted at the last position
Returns:
{sap.m.ObjectListItem} Reference to this in order to allow method chaining
removeAllAttributes(): sap.m.ObjectAttribute[]
Removes all the controls from the aggregation attributes.

Additionally, it unregisters them from the hosting UIArea.

Returns:
{sap.m.ObjectAttribute[]} An array of the removed elements (might be empty)
removeAttribute(vAttribute): sap.m.ObjectAttribute
Removes a attribute from the aggregation attributes.
Parameters:
{int|string|sap.m.ObjectAttribute}vAttribute The attributeto remove or its index or id
Returns:
{sap.m.ObjectAttribute} The removed attribute or null
setActiveIcon(sActiveIcon): sap.m.ObjectListItem
Sets a new value for property activeIcon.

Icon displayed when the ObjectListItem is active.

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

Parameters:
{sap.ui.core.URI}sActiveIcon New value for property activeIcon
Returns:
{sap.m.ObjectListItem} Reference to this in order to allow method chaining
setFirstStatus(oFirstStatus): sap.m.ObjectListItem
Sets the aggregated firstStatus.
Parameters:
{sap.m.ObjectStatus}oFirstStatus The firstStatus to set
Returns:
{sap.m.ObjectListItem} Reference to this in order to allow method chaining
setIcon(sIcon): sap.m.ObjectListItem
Sets a new value for property icon.

ObjectListItem icon displayed to the left of the title.

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

Parameters:
{sap.ui.core.URI}sIcon New value for property icon
Returns:
{sap.m.ObjectListItem} Reference to this in order to allow method chaining
setIconDensityAware(bIconDensityAware): sap.m.ObjectListItem
Sets a new value for property iconDensityAware.

By default, this is set to true but then one or more requests are sent trying to get the density perfect version of image (in case this version of image dоesn't exist on the server).

If bandwidth is key 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.

Parameters:
{boolean}bIconDensityAware New value for property iconDensityAware
Returns:
{sap.m.ObjectListItem} Reference to this in order to allow method chaining
setIntro(sIntro): sap.m.ObjectListItem
Sets a new value for property intro.

Defines the introductory text for the ObjectListItem.

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

Parameters:
{string}sIntro New value for property intro
Returns:
{sap.m.ObjectListItem} Reference to this in order to allow method chaining
setIntroTextDirection(sIntroTextDirection): sap.m.ObjectListItem
Sets a new value for property introTextDirection.

Determines the text direction of the item intro. Available options for the intro direction are LTR (left-to-right) and RTL (right-to-left). By default the item intro inherits the text direction from its parent.

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

Default value is Inherit.

Parameters:
{sap.ui.core.TextDirection}sIntroTextDirection New value for property introTextDirection
Returns:
{sap.m.ObjectListItem} Reference to this in order to allow method chaining
setMarkFavorite(bMarkFavorite): sap.m.ObjectListItem
Sets a new value for property markFavorite.

Sets the favorite state for the ObjectListItem.

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

Parameters:
{boolean}bMarkFavorite New value for property markFavorite
Since:
1.16.0
Returns:
{sap.m.ObjectListItem} Reference to this in order to allow method chaining
setMarkFlagged(bMarkFlagged): sap.m.ObjectListItem
Sets a new value for property markFlagged.

Sets the flagged state for the ObjectListItem.

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

Parameters:
{boolean}bMarkFlagged New value for property markFlagged
Since:
1.16.0
Returns:
{sap.m.ObjectListItem} Reference to this in order to allow method chaining
setMarkLocked(bMarkLocked): sap.m.ObjectListItem
Sets a new value for property markLocked.

Sets the locked state of the ObjectListItem.

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

Default value is false.

Parameters:
{boolean}bMarkLocked New value for property markLocked
Since:
1.28
Returns:
{sap.m.ObjectListItem} Reference to this in order to allow method chaining
setNumber(sNumber): sap.m.ObjectListItem
Sets a new value for property number.

Defines the ObjectListItem number.

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

Parameters:
{string}sNumber New value for property number
Returns:
{sap.m.ObjectListItem} Reference to this in order to allow method chaining
setNumberState(sNumberState): sap.m.ObjectListItem
Sets a new value for property numberState.

Defines the ObjectListItem number and numberUnit value state.

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

Default value is None.

Parameters:
{sap.ui.core.ValueState}sNumberState New value for property numberState
Since:
1.16.0
Returns:
{sap.m.ObjectListItem} Reference to this in order to allow method chaining
setNumberTextDirection(sNumberTextDirection): sap.m.ObjectListItem
Sets a new value for property numberTextDirection.

Determines the text direction of the item number. Available options for the number direction are LTR (left-to-right) and RTL (right-to-left). By default the item number inherits the text direction from its parent.

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

Default value is Inherit.

Parameters:
{sap.ui.core.TextDirection}sNumberTextDirection New value for property numberTextDirection
Returns:
{sap.m.ObjectListItem} Reference to this in order to allow method chaining
setNumberUnit(sNumberUnit): sap.m.ObjectListItem
Sets a new value for property numberUnit.

Defines the number units qualifier of the ObjectListItem.

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

Parameters:
{string}sNumberUnit New value for property numberUnit
Returns:
{sap.m.ObjectListItem} Reference to this in order to allow method chaining
setSecondStatus(oSecondStatus): sap.m.ObjectListItem
Sets the aggregated secondStatus.
Parameters:
{sap.m.ObjectStatus}oSecondStatus The secondStatus to set
Returns:
{sap.m.ObjectListItem} Reference to this in order to allow method chaining
setShowMarkers(bShowMarkers): sap.m.ObjectListItem
Sets a new value for property showMarkers.

If set to true, the ObjectListItem can be marked with icons such as favorite and flag.

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

Parameters:
{boolean}bShowMarkers New value for property showMarkers
Since:
1.16.0
Returns:
{sap.m.ObjectListItem} Reference to this in order to allow method chaining
setTitle(sTitle): sap.m.ObjectListItem
Sets a new value for property title.

Defines the ObjectListItem title.

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

Parameters:
{string}sTitle New value for property title
Returns:
{sap.m.ObjectListItem} Reference to this in order to allow method chaining
setTitleTextDirection(sTitleTextDirection): sap.m.ObjectListItem
Sets a new value for property titleTextDirection.

Determines the text direction of the item title. Available options for the title direction are LTR (left-to-right) and RTL (right-to-left). By default the item title inherits the text direction from its parent.

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

Default value is Inherit.

Parameters:
{sap.ui.core.TextDirection}sTitleTextDirection New value for property titleTextDirection
Returns:
{sap.m.ObjectListItem} Reference to this in order to allow method chaining