class sap.m.ObjectIdentifier

Control sample: sap.m.ObjectIdentifier
Visiblity: public
UX Guidelines: Object Identifier
Implements:
Available since: N/A
Module: sap/m/ObjectIdentifier
Application Component: CA-UI5-CTR

The ObjectIdentifier is a display control that enables the user to easily identify a specific object. The ObjectIdentifier title is the key identifier of the object and additional text can be used to further distinguish it from other objects.

Note: This control should not be used with sap.m.Label or in Forms along with sap.m.Label.

This control can be a drag source.

Constructor

Constructor for a new ObjectIdentifier.

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.ObjectIdentifier(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
badgeAttachments boolean

Indicates whether or not the attachments icon is displayed.

Visibility: public
badgeNotes boolean

Indicates whether or not the notes icon is displayed.

Visibility: public
badgePeople boolean

Indicates whether or not the address book icon is displayed.

Visibility: public
emptyIndicatorMode sap.m.EmptyIndicatorMode Off

Specifies if an empty indicator should be displayed when there is no text.

Since: 1.89.

Visibility: public
text string

Defines the object text.

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

Specifies the element's text directionality with enumerated options. By default, the control inherits text direction from the DOM.

Since: 1.28.0.

Visibility: public
title string

Defines the object title.

Visibility: public
titleActive boolean false

Indicates if the ObjectIdentifier's title is clickable.

Since: 1.26.

Visibility: public
visible boolean true

Indicates if the ObjectIdentifier is visible. An invisible ObjectIdentifier is not being rendered.

Visibility: public

Aggregations

Default Aggregation:

Name Cardinality Type Description
_textControl 0..1 sap.ui.core.Control

Text control to display the object text.

_titleControl 0..1 sap.ui.core.Control

Control to display the object title (can be either Text or Link).


Associations

Name Cardinality Type Description
ariaLabelledBy 0..n sap.ui.core.Control

Association to controls / IDs, which label this control (see WAI-ARIA attribute aria-labelledby).


Events Overview

Event Description
titlePress

Fires when the title is active and the user taps/clicks on it.

Since: 1.26.

titlePress

Fires when the title is active and the user taps/clicks on it.

Since: 1.26.

Param Type Description
oControlEvent sap.ui.base.Event
getSource sap.ui.base.EventProvider
getParameters object
domRef object

DOM reference of the object identifier's title.


Methods Overview

Method Description
addAriaLabelledBy

Adds some ariaLabelledBy into the association ariaLabelledBy.

attachTitlePress

Attaches event handler fnFunction to the titlePress event of this sap.m.ObjectIdentifier.

When called, the context of the event handler (its this) will be bound to oListener if specified, otherwise it will be bound to this sap.m.ObjectIdentifier itself.

Fires when the title is active and the user taps/clicks on it.

detachTitlePress

Detaches event handler fnFunction from the titlePress event of this sap.m.ObjectIdentifier.

The passed function and listener object must match the ones used for event registration.

sap.m.ObjectIdentifier.extend

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

fireTitlePress

Fires event titlePress to attached listeners.

getAccessibilityInfo

References:

  • sap.ui.core.Control#getAccessibilityInfo

getAriaLabelledBy

Returns array of IDs of the elements which are the current targets of the association ariaLabelledBy.

getBadgeAttachments

Gets current value of property badgeAttachments.

Indicates whether or not the attachments icon is displayed.

Since 1.24.0 There is no replacement for the moment.
getBadgeNotes

Gets current value of property badgeNotes.

Indicates whether or not the notes icon is displayed.

Since 1.24.0 There is no replacement for the moment.
getBadgePeople

Gets current value of property badgePeople.

Indicates whether or not the address book icon is displayed.

Since 1.24.0 There is no replacement for the moment.
getEmptyIndicatorMode

Gets current value of property emptyIndicatorMode.

Specifies if an empty indicator should be displayed when there is no text.

Default value is Off.

sap.m.ObjectIdentifier.getMetadata

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

getText

Gets current value of property text.

Defines the object text.

getTextDirection

Gets current value of property textDirection.

Specifies the element's text directionality with enumerated options. By default, the control inherits text direction from the DOM.

Default value is Inherit.

getTitle

Gets current value of property title.

Defines the object title.

getTitleActive

Gets current value of property titleActive.

Indicates if the ObjectIdentifier's title is clickable.

Default value is false.

getVisible

Gets current value of property visible.

Indicates if the ObjectIdentifier is visible. An invisible ObjectIdentifier is not being rendered.

Default value is true.

removeAllAriaLabelledBy

Removes all the controls in the association named ariaLabelledBy.

removeAriaLabelledBy

Removes an ariaLabelledBy from the association named ariaLabelledBy.

setBadgeAttachments

Sets a new value for property badgeAttachments.

Indicates whether or not the attachments icon is displayed.

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

Since 1.24.0 There is no replacement for the moment.
setBadgeNotes

Sets a new value for property badgeNotes.

Indicates whether or not the notes icon is displayed.

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

Since 1.24.0 There is no replacement for the moment.
setBadgePeople

Sets a new value for property badgePeople.

Indicates whether or not the address book icon is displayed.

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

Since 1.24.0 There is no replacement for the moment.
setEmptyIndicatorMode

Sets a new value for property emptyIndicatorMode.

Specifies if an empty indicator should be displayed when there is no text.

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

Default value is Off.

setText

Sets text. Default value is empty/undefined.

setTextDirection

Sets a new value for property textDirection.

Specifies the element's 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.

setTitle

Sets the title. Default value is empty/undefined.

setTitleActive

Sets property titleActive. Default value is false.

setVisible

Sets a new value for property visible.

Indicates if the ObjectIdentifier is visible. An invisible ObjectIdentifier is not being rendered.

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

Default value is true.

addAriaLabelledBy

Adds some ariaLabelledBy into the association ariaLabelledBy.

Param Type DefaultValue Description
vAriaLabelledBy sap.ui.core.ID sap.ui.core.Control

The ariaLabelledBy to add; if empty, nothing is inserted

attachTitlePress

Attaches event handler fnFunction to the titlePress event of this sap.m.ObjectIdentifier.

When called, the context of the event handler (its this) will be bound to oListener if specified, otherwise it will be bound to this sap.m.ObjectIdentifier itself.

Fires when the title is active and the user taps/clicks on it.

Param Type DefaultValue Description
oData object

An application-specific payload object that will be passed to the event handler along with the event object when firing the event

fnFunction function(sap.ui.base.Event) : void

The function to be called when the event occurs

oListener object

Context object to call the event handler with. Defaults to this sap.m.ObjectIdentifier itself

detachTitlePress

Detaches event handler fnFunction from the titlePress event of this sap.m.ObjectIdentifier.

The passed function and listener object must match the ones used for event registration.

Param Type DefaultValue Description
fnFunction function(sap.ui.base.Event) : void

The function to be called, when the event occurs

oListener object

Context object on which the given function had to be called

sap.m.ObjectIdentifier.extend

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

fireTitlePress

Fires event titlePress to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

domRef object

DOM reference of the object identifier's title.

getAccessibilityInfo

References:

getAriaLabelledBy

Returns array of IDs of the elements which are the current targets of the association ariaLabelledBy.

getBadgeAttachments

Gets current value of property badgeAttachments.

Indicates whether or not the attachments icon is displayed.

Since 1.24.0 There is no replacement for the moment.

getBadgeNotes

Gets current value of property badgeNotes.

Indicates whether or not the notes icon is displayed.

Since 1.24.0 There is no replacement for the moment.

getBadgePeople

Gets current value of property badgePeople.

Indicates whether or not the address book icon is displayed.

Since 1.24.0 There is no replacement for the moment.

getEmptyIndicatorMode

Gets current value of property emptyIndicatorMode.

Specifies if an empty indicator should be displayed when there is no text.

Default value is Off.

sap.m.ObjectIdentifier.getMetadata

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

getText

Gets current value of property text.

Defines the object text.

getTextDirection

Gets current value of property textDirection.

Specifies the element's text directionality with enumerated options. By default, the control inherits text direction from the DOM.

Default value is Inherit.

getTitle

Gets current value of property title.

Defines the object title.

getTitleActive

Gets current value of property titleActive.

Indicates if the ObjectIdentifier's title is clickable.

Default value is false.

getVisible

Gets current value of property visible.

Indicates if the ObjectIdentifier is visible. An invisible ObjectIdentifier is not being rendered.

Default value is true.

removeAllAriaLabelledBy

Removes all the controls in the association named ariaLabelledBy.

removeAriaLabelledBy

Removes an ariaLabelledBy from the association named ariaLabelledBy.

Param Type DefaultValue Description
vAriaLabelledBy int sap.ui.core.ID sap.ui.core.Control

The ariaLabelledBy to be removed or its index or ID

setBadgeAttachments

Sets a new value for property badgeAttachments.

Indicates whether or not the attachments icon is displayed.

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

Since 1.24.0 There is no replacement for the moment.
Param Type DefaultValue Description
bBadgeAttachments boolean

New value for property badgeAttachments

setBadgeNotes

Sets a new value for property badgeNotes.

Indicates whether or not the notes icon is displayed.

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

Since 1.24.0 There is no replacement for the moment.
Param Type DefaultValue Description
bBadgeNotes boolean

New value for property badgeNotes

setBadgePeople

Sets a new value for property badgePeople.

Indicates whether or not the address book icon is displayed.

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

Since 1.24.0 There is no replacement for the moment.
Param Type DefaultValue Description
bBadgePeople boolean

New value for property badgePeople

setEmptyIndicatorMode

Sets a new value for property emptyIndicatorMode.

Specifies if an empty indicator should be displayed when there is no text.

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

Default value is Off.

Param Type DefaultValue Description
sEmptyIndicatorMode sap.m.EmptyIndicatorMode Off

New value for property emptyIndicatorMode

setText

Sets text. Default value is empty/undefined.

Param Type DefaultValue Description
sText string

New value for property text

setTextDirection

Sets a new value for property textDirection.

Specifies the element's 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
sTextDirection sap.ui.core.TextDirection Inherit

New value for property textDirection

setTitle

Sets the title. Default value is empty/undefined.

Param Type DefaultValue Description
sTitle string

New value for property title

setTitleActive

Sets property titleActive. Default value is false.

Param Type DefaultValue Description
bValue boolean

new value for property titleActive

setVisible

Sets a new value for property visible.

Indicates if the ObjectIdentifier is visible. An invisible ObjectIdentifier is not being rendered.

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
bVisible boolean true

New value for property visible