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.
Note: The control must only be used in the context of a list.
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#constructor for a general description of the syntax of the settings object.
new sap.m.ObjectListItem(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 |
Name | Type | Default Value | Description |
---|---|---|---|
activeIcon | sap.ui.core.URI | Icon displayed when the ObjectListItem is active. Visibility: public |
|
icon | sap.ui.core.URI | ObjectListItem icon displayed to the left of the title. Visibility: public |
|
iconDensityAware | boolean | true | 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 doesn't exist on the server). If bandwidth is key for the application, set this value to false. Visibility: public |
intro | string | Defines the introductory text for the ObjectListItem. Visibility: public |
|
introTextDirection | sap.ui.core.TextDirection | Inherit | 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. Visibility: public |
markFavorite | boolean | Sets the favorite state for the ObjectListItem. |
|
markFlagged | boolean | Sets the flagged state for the ObjectListItem. |
|
markLocked | boolean | false | Sets the locked state of the ObjectListItem. |
number | string | Defines the ObjectListItem number. Visibility: public |
|
numberState | sap.ui.core.ValueState | None | Defines the ObjectListItem number and numberUnit value state. |
numberTextDirection | sap.ui.core.TextDirection | Inherit | 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. Visibility: public |
numberUnit | string | Defines the number units qualifier of the ObjectListItem. Visibility: public |
|
showMarkers | boolean | If set to true, the ObjectListItem can be marked with icons such as favorite and flag. |
|
title | string | Defines the ObjectListItem title. Visibility: public |
|
titleTextDirection | sap.ui.core.TextDirection | Inherit | 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. Visibility: public |
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 Accessibility support is provided through the associated highlightText property. If the |
highlightText | string | empty string | Defines the semantics of the highlight property for accessibility purposes. |
navigated | boolean | false | The navigated state of the list item. If set to |
selected | boolean | false | Defines the selected state of the list items. Note: Binding the |
type | sap.m.ListType | Inactive | Defines the visual indication and behavior of the list items, e.g. |
unread | boolean | false | Activates the unread indicator for the list item, if set to |
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 |
Default Aggregation: attributes
Name | Cardinality | Type | Description |
---|---|---|---|
_objectNumber | 0..1 | sap.m.ObjectNumber |
Internal |
attributes (default) | 0..n | sap.m.ObjectAttribute |
List of attributes displayed below the title to the left of the status fields. |
firstStatus | 0..1 | sap.m.ObjectStatus |
First status text field displayed on the right side of the attributes. |
markers | 0..n | sap.m.ObjectMarker |
List of markers (icon and/or text) that can be displayed for the |
secondStatus | 0..1 | sap.m.ObjectStatus |
Second status text field displayed on the right side of the attributes. |
Method | Description |
---|---|
addAttribute |
Adds some attribute to the aggregation attributes. |
addMarker |
Adds some marker to the aggregation markers. |
destroyAttributes |
Destroys all the attributes in the aggregation attributes. |
destroyFirstStatus |
Destroys the firstStatus in the aggregation firstStatus. |
destroyMarkers |
Destroys all the markers in the aggregation markers. |
destroySecondStatus |
Destroys the secondStatus in the aggregation secondStatus. |
sap.m.ObjectListItem.extend |
Creates a new subclass of class sap.m.ObjectListItem with name
|
getActiveIcon |
Gets current value of property activeIcon. Icon displayed when the ObjectListItem is active. |
getAttributes |
Gets content of aggregation attributes. List of attributes displayed below the title to the left of the status fields. |
getFirstStatus |
Gets content of aggregation firstStatus. First status text field displayed on the right side of the attributes. |
getIcon |
Gets current value of property icon. ObjectListItem icon displayed to the left of the title. |
getIconDensityAware |
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 doesn't exist on the server). If bandwidth is key for the application, set this value to false. Default value is |
getIntro |
Gets current value of property intro. Defines the introductory text for the ObjectListItem. |
getIntroTextDirection |
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 |
getMarkers |
Gets content of aggregation markers. List of markers (icon and/or text) that can be displayed for the |
getMarkFavorite |
Gets current value of property markFavorite. Sets the favorite state for the ObjectListItem.
Since 1.42.0 replaced by <code>markers</code> aggregation. Add {@link sap.m.ObjectMarker} with type <code>sap.m.ObjectMarkerType.Favorite</code>. You should use either this property or the <code>markers</code> aggregation, using both may lead to unpredicted behavior.
|
getMarkFlagged |
Gets current value of property markFlagged. Sets the flagged state for the ObjectListItem.
Since 1.42.0 replaced by <code>markers</code> aggregation. Add {@link sap.m.ObjectMarker} with type <code>sap.m.ObjectMarkerType.Flagged</code>. You should use either this property or the <code>markers</code> aggregation, using both may lead to unpredicted behavior.
|
getMarkLocked |
Gets current value of property markLocked. Sets the locked state of the ObjectListItem. Default value is
Since 1.42.0 replaced by <code>markers</code> aggregation. Add {@link sap.m.ObjectMarker} with type <code>sap.m.ObjectMarkerType.Locked</code>. You should use either this property or the <code>markers</code> aggregation, using both may lead to unpredicted behavior.<br><br>
|
sap.m.ObjectListItem.getMetadata |
Returns a metadata object for class sap.m.ObjectListItem. |
getNumber |
Gets current value of property number. Defines the ObjectListItem number. |
getNumberState |
Gets current value of property numberState. Defines the ObjectListItem number and numberUnit value state. Default value is |
getNumberTextDirection |
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 |
getNumberUnit |
Gets current value of property numberUnit. Defines the number units qualifier of the ObjectListItem. |
getSecondStatus |
Gets content of aggregation secondStatus. Second status text field displayed on the right side of the attributes. |
getShowMarkers |
Gets current value of property showMarkers. If set to true, the ObjectListItem can be marked with icons such as favorite and flag.
Since 1.42.0 replaced by <code>markers</code> aggregation. This property is valid only if you are using the already deprecated properties - <code>markFlagged</code>, <code>markFavorite</code>, and <code>markLocked</code>. If you are using the <code>markers</code> aggregation, the visibility of the markers depends on what is set in the aggregation itself.
|
getTitle |
Gets current value of property title. Defines the ObjectListItem title. |
getTitleTextDirection |
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 |
indexOfAttribute |
Checks for the provided |
indexOfMarker |
Checks for the provided |
insertAttribute |
Inserts a attribute into the aggregation attributes. |
insertMarker |
Inserts a marker into the aggregation markers. |
removeAllAttributes |
Removes all the controls from the aggregation attributes. Additionally, it unregisters them from the hosting UIArea. |
removeAllMarkers |
Removes all the controls from the aggregation markers. Additionally, it unregisters them from the hosting UIArea. |
removeAttribute |
Removes a attribute from the aggregation attributes. |
removeMarker |
Removes a marker from the aggregation markers. |
setActiveIcon |
Sets a new value for property activeIcon. Icon displayed when the ObjectListItem is active. When called with a value of |
setFirstStatus |
Sets the aggregated firstStatus. |
setIcon |
Sets a new value for property icon. ObjectListItem icon displayed to the left of the title. When called with a value of |
setIconDensityAware |
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 doesn't exist on the server). If bandwidth is key for the application, set this value to false. When called with a value of Default value is |
setIntro |
Sets a new value for property intro. Defines the introductory text for the ObjectListItem. When called with a value of |
setIntroTextDirection |
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 Default value is |
setMarkFavorite |
Sets the visibility value of the Favorite marker. |
setMarkFlagged |
Sets the visibility value of the Flagged marker. |
setMarkLocked |
Sets the visibility value of the Favorite marker. |
setNumber |
Sets a new value for property number. Defines the ObjectListItem number. When called with a value of |
setNumberState |
Sets a new value for property numberState. Defines the ObjectListItem number and numberUnit value state. When called with a value of Default value is |
setNumberTextDirection |
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 Default value is |
setNumberUnit |
Sets a new value for property numberUnit. Defines the number units qualifier of the ObjectListItem. When called with a value of |
setSecondStatus |
Sets the aggregated secondStatus. |
setShowMarkers |
Sets the visibility value of the Flagged and Favorite markers. |
setTitle |
Sets a new value for property title. Defines the ObjectListItem title. When called with a value of |
setTitleTextDirection |
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 Default value is |
Adds some attribute to the aggregation attributes.
Param | Type | DefaultValue | Description |
---|---|---|---|
oAttribute | sap.m.ObjectAttribute |
The attribute to add; if empty, nothing is inserted |
Adds some marker to the aggregation markers.
Param | Type | DefaultValue | Description |
---|---|---|---|
oMarker | sap.m.ObjectMarker |
The marker to add; if empty, nothing is inserted |
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.
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 |
Gets current value of property activeIcon.
Icon displayed when the ObjectListItem is active.
Gets content of aggregation attributes.
List of attributes displayed below the title to the left of the status fields.
Gets content of aggregation firstStatus.
First status text field displayed on the right side of the attributes.
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 doesn't exist on the server).
If bandwidth is key for the application, set this value to false.
Default value is true
.
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
.
Gets content of aggregation markers.
List of markers (icon and/or text) that can be displayed for the ObjectListItems
, such as favorite and flagged.
Note: You should use either this aggregation or the already deprecated properties - markFlagged
, markFavorite
, and markLocked
. Using both can lead to unexpected results.
Gets current value of property markFavorite.
Sets the favorite state for the ObjectListItem.
Gets current value of property markFlagged.
Sets the flagged state for the ObjectListItem.
Gets current value of property markLocked.
Sets the locked state of the ObjectListItem.
Default value is false
.
Gets current value of property numberState.
Defines the ObjectListItem number and numberUnit value state.
Default value is None
.
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
.
Gets current value of property numberUnit.
Defines the number units qualifier of the ObjectListItem.
Gets content of aggregation secondStatus.
Second status text field displayed on the right side of the attributes.
Gets current value of property showMarkers.
If set to true, the ObjectListItem can be marked with icons such as favorite and flag.
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
.
Checks for the provided sap.m.ObjectAttribute
in the aggregation attributes. and returns its index if found or -1 otherwise.
Param | Type | DefaultValue | Description |
---|---|---|---|
oAttribute | sap.m.ObjectAttribute |
The attribute whose index is looked for |
Checks for the provided sap.m.ObjectMarker
in the aggregation markers. and returns its index if found or -1 otherwise.
Param | Type | DefaultValue | Description |
---|---|---|---|
oMarker | sap.m.ObjectMarker |
The marker whose index is looked for |
Inserts a attribute into the aggregation attributes.
Param | Type | DefaultValue | Description |
---|---|---|---|
oAttribute | sap.m.ObjectAttribute |
The attribute to insert; if empty, nothing is inserted |
|
iIndex | int |
The |
Inserts a marker into the aggregation markers.
Param | Type | DefaultValue | Description |
---|---|---|---|
oMarker | sap.m.ObjectMarker |
The marker to insert; if empty, nothing is inserted |
|
iIndex | int |
The |
Removes all the controls from the aggregation attributes.
Additionally, it unregisters them from the hosting UIArea.
Removes all the controls from the aggregation markers.
Additionally, it unregisters them from the hosting UIArea.
Removes a attribute from the aggregation attributes.
Param | Type | DefaultValue | Description |
---|---|---|---|
vAttribute | int string sap.m.ObjectAttribute |
The attribute to remove or its index or id |
Removes a marker from the aggregation markers.
Param | Type | DefaultValue | Description |
---|---|---|---|
vMarker | int string sap.m.ObjectMarker |
The marker to remove or its index or id |
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.
Param | Type | DefaultValue | Description |
---|---|---|---|
sActiveIcon | sap.ui.core.URI |
New value for property |
Sets the aggregated firstStatus.
Param | Type | DefaultValue | Description |
---|---|---|---|
oFirstStatus | sap.m.ObjectStatus |
The firstStatus to set |
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.
Param | Type | DefaultValue | Description |
---|---|---|---|
sIcon | sap.ui.core.URI |
New value for property |
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 doesn'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
.
Param | Type | DefaultValue | Description |
---|---|---|---|
bIconDensityAware | boolean | true |
New value for property |
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.
Param | Type | DefaultValue | Description |
---|---|---|---|
sIntro | string |
New value for property |
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
.
Param | Type | DefaultValue | Description |
---|---|---|---|
sIntroTextDirection | sap.ui.core.TextDirection | Inherit |
New value for property |
Sets the visibility value of the Favorite marker.
Param | Type | DefaultValue | Description |
---|---|---|---|
bMarked | boolean |
the new value |
Sets the visibility value of the Flagged marker.
Param | Type | DefaultValue | Description |
---|---|---|---|
bMarked | boolean |
the new value |
Sets the visibility value of the Favorite marker.
Param | Type | DefaultValue | Description |
---|---|---|---|
bMarked | boolean |
the new value |
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.
Param | Type | DefaultValue | Description |
---|---|---|---|
sNumber | string |
New value for property |
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
.
Param | Type | DefaultValue | Description |
---|---|---|---|
sNumberState | sap.ui.core.ValueState | None |
New value for property |
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
.
Param | Type | DefaultValue | Description |
---|---|---|---|
sNumberTextDirection | sap.ui.core.TextDirection | Inherit |
New value for property |
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.
Param | Type | DefaultValue | Description |
---|---|---|---|
sNumberUnit | string |
New value for property |
Sets the aggregated secondStatus.
Param | Type | DefaultValue | Description |
---|---|---|---|
oSecondStatus | sap.m.ObjectStatus |
The secondStatus to set |
Sets the visibility value of the Flagged and Favorite markers.
Param | Type | DefaultValue | Description |
---|---|---|---|
bMarked | boolean |
the new value |
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.
Param | Type | DefaultValue | Description |
---|---|---|---|
sTitle | string |
New value for property |
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
.
Param | Type | DefaultValue | Description |
---|---|---|---|
sTitleTextDirection | sap.ui.core.TextDirection | Inherit |
New value for property |