Class sap.m.ObjectListItemModule: sap/m/ObjectListItem
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.
sClassName
and enriches it with the information contained in oClassInfo
.sap.m.ObjectAttribute
in the aggregation attributes
. 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:
- Properties
- title : string
- number : string
- numberUnit : string
- intro : string
- icon : sap.ui.core.URI
- activeIcon : sap.ui.core.URI
- iconDensityAware : boolean (default: true)
- markFavorite : boolean
- markFlagged : boolean
- showMarkers : boolean
- numberState : sap.ui.core.ValueState (default: None)
- titleTextDirection : sap.ui.core.TextDirection (default: Inherit)
- introTextDirection : sap.ui.core.TextDirection (default: Inherit)
- numberTextDirection : sap.ui.core.TextDirection (default: Inherit)
- markLocked : boolean (default: false)
- Aggregations
- attributes : sap.m.ObjectAttribute[] (default)
- firstStatus : sap.m.ObjectStatus
- secondStatus : sap.m.ObjectStatus
In addition, all settings applicable to the base type sap.m.ListItemBase can be used as well.
{string} | sId? | ID for the new control, generated automatically if no ID is given |
{object} | mSettings? | Initial settings for the new control |
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.
{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 |
{function} | Created class / constructor function |
{sap.ui.base.Metadata} | Metadata object describing this class |
attributes
. {sap.m.ObjectAttribute} | oAttribute | the attribute to add; if empty, nothing is inserted |
{sap.m.ObjectListItem} | Reference to this in order to allow method chaining |
attributes
. {sap.m.ObjectListItem} | Reference to this in order to allow method chaining |
firstStatus
. {sap.m.ObjectListItem} | Reference to this in order to allow method chaining |
secondStatus
. {sap.m.ObjectListItem} | Reference to this in order to allow method chaining |
activeIcon
. Icon displayed when the ObjectListItem is active.
{sap.ui.core.URI} | Value of property activeIcon |
attributes
. List of attributes displayed below the title to the left of the status fields.
{sap.m.ObjectAttribute[]} |
firstStatus
. First status text field displayed on the right side of the attributes.
{sap.m.ObjectStatus} |
icon
. ObjectListItem icon displayed to the left of the title.
{sap.ui.core.URI} | Value of property icon |
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
.
{boolean} | Value of property iconDensityAware |
intro
. Defines the introductory text for the ObjectListItem.
{string} | Value of property intro |
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
.
{sap.ui.core.TextDirection} | Value of property introTextDirection |
markFavorite
. Sets the favorite state for the ObjectListItem.
- Since:
- 1.16.0
{boolean} | Value of property markFavorite |
markFlagged
. Sets the flagged state for the ObjectListItem.
- Since:
- 1.16.0
{boolean} | Value of property markFlagged |
markLocked
. Sets the locked state of the ObjectListItem.
Default value is false
.
- Since:
- 1.28
{boolean} | Value of property markLocked |
number
. Defines the ObjectListItem number.
{string} | Value of property number |
numberState
. Defines the ObjectListItem number and numberUnit value state.
Default value is None
.
- Since:
- 1.16.0
{sap.ui.core.ValueState} | Value of property numberState |
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
.
{sap.ui.core.TextDirection} | Value of property numberTextDirection |
numberUnit
. Defines the number units qualifier of the ObjectListItem.
{string} | Value of property numberUnit |
secondStatus
. Second status text field displayed on the right side of the attributes.
{sap.m.ObjectStatus} |
showMarkers
. If set to true, the ObjectListItem can be marked with icons such as favorite and flag.
- Since:
- 1.16.0
{boolean} | Value of property showMarkers |
title
. Defines the ObjectListItem title.
{string} | Value of property title |
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
.
{sap.ui.core.TextDirection} | Value of property titleTextDirection |
sap.m.ObjectAttribute
in the aggregation attributes
. and returns its index if found or -1 otherwise. {sap.m.ObjectAttribute} | oAttribute | The attribute whose index is looked for |
{int} | The index of the provided control in the aggregation if found, or -1 otherwise |
attributes
. {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 |
{sap.m.ObjectListItem} | Reference to this in order to allow method chaining |
attributes
. Additionally, it unregisters them from the hosting UIArea.
{sap.m.ObjectAttribute[]} | An array of the removed elements (might be empty) |
attributes
. {int|string|sap.m.ObjectAttribute} | vAttribute | The attributeto remove or its index or id |
{sap.m.ObjectAttribute} | The removed attribute or null |
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.
{sap.ui.core.URI} | sActiveIcon | New value for property activeIcon |
{sap.m.ObjectListItem} | Reference to this in order to allow method chaining |
firstStatus
. {sap.m.ObjectStatus} | oFirstStatus | The firstStatus to set |
{sap.m.ObjectListItem} | Reference to this in order to allow method chaining |
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.
{sap.ui.core.URI} | sIcon | New value for property icon |
{sap.m.ObjectListItem} | Reference to this in order to allow method chaining |
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
.
{boolean} | bIconDensityAware | New value for property iconDensityAware |
{sap.m.ObjectListItem} | Reference to this in order to allow method chaining |
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.
{string} | sIntro | New value for property intro |
{sap.m.ObjectListItem} | Reference to this in order to allow method chaining |
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
.
{sap.ui.core.TextDirection} | sIntroTextDirection | New value for property introTextDirection |
{sap.m.ObjectListItem} | Reference to this in order to allow method chaining |
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.
{boolean} | bMarkFavorite | New value for property markFavorite |
- Since:
- 1.16.0
{sap.m.ObjectListItem} | Reference to this in order to allow method chaining |
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.
{boolean} | bMarkFlagged | New value for property markFlagged |
- Since:
- 1.16.0
{sap.m.ObjectListItem} | Reference to this in order to allow method chaining |
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
.
{boolean} | bMarkLocked | New value for property markLocked |
- Since:
- 1.28
{sap.m.ObjectListItem} | Reference to this in order to allow method chaining |
number
. Defines the ObjectListItem number.
When called with a value of null
or undefined
, the default value of the property will be restored.
{string} | sNumber | New value for property number |
{sap.m.ObjectListItem} | Reference to this in order to allow method chaining |
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
.
{sap.ui.core.ValueState} | sNumberState | New value for property numberState |
- Since:
- 1.16.0
{sap.m.ObjectListItem} | Reference to this in order to allow method chaining |
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
.
{sap.ui.core.TextDirection} | sNumberTextDirection | New value for property numberTextDirection |
{sap.m.ObjectListItem} | Reference to this in order to allow method chaining |
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.
{string} | sNumberUnit | New value for property numberUnit |
{sap.m.ObjectListItem} | Reference to this in order to allow method chaining |
secondStatus
. {sap.m.ObjectStatus} | oSecondStatus | The secondStatus to set |
{sap.m.ObjectListItem} | Reference to this in order to allow method chaining |
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.
{boolean} | bShowMarkers | New value for property showMarkers |
- Since:
- 1.16.0
{sap.m.ObjectListItem} | Reference to this in order to allow method chaining |
title
. Defines the ObjectListItem title.
When called with a value of null
or undefined
, the default value of the property will be restored.
{string} | sTitle | New value for property title |
{sap.m.ObjectListItem} | Reference to this in order to allow method chaining |
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
.
{sap.ui.core.TextDirection} | sTitleTextDirection | New value for property titleTextDirection |
{sap.m.ObjectListItem} | Reference to this in order to allow method chaining |