Class sap.m.ObjectIdentifierModule: sap/m/ObjectIdentifier

extends Control

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 and icons can be used to further distinguish it from other objects.


Since: 1.12.
Constructor Summary
new sap.m.ObjectIdentifier(sId?, mSettings?)Constructor for a new ObjectIdentifier.
Event Summary
titlePress(oControlEvent)Fires when the title is active and the user taps/clicks on it.
Events borrowed from class sap.ui.core.Control
Method Summary
sap.m.ObjectIdentifier.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.m.ObjectIdentifier with name sClassName and enriches it with the information contained in oClassInfo.
sap.m.ObjectIdentifier.getMetadata()Returns a metadata object for class sap.m.ObjectIdentifier.
addAriaLabelledBy(vAriaLabelledBy)Adds some ariaLabelledBy into the association ariaLabelledBy.
attachTitlePress(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the titlePress event of this sap.m.ObjectIdentifier.
detachTitlePress(fnFunction, oListener)Detaches event handler fnFunction from the titlePress event of this sap.m.ObjectIdentifier.
fireTitlePress(mArguments?)Fires event titlePress to attached listeners.
getAriaLabelledBy()Returns array of IDs of the elements which are the current targets of the association ariaLabelledBy.
getText()Gets current value of property text.
getTextDirection()Gets current value of property textDirection.
getTitle()Gets current value of property title.
getTitleActive()Gets current value of property titleActive.
getVisible()Gets current value of property visible.
removeAllAriaLabelledBy()Removes all the controls in the association named ariaLabelledBy.
removeAriaLabelledBy(vAriaLabelledBy)Removes an ariaLabelledBy from the association named ariaLabelledBy.
setText(sText)Sets text.
setTextDirection(sTextDirection)Sets a new value for property textDirection.
setTitle(sTitle)Sets the title.
setTitleActive(bValue)Sets property titleActive.
setVisible(bVisible)Sets a new value for property visible.
getBadgeAttachments()Gets current value of property badgeAttachments.
getBadgeNotes()Gets current value of property badgeNotes.
getBadgePeople()Gets current value of property badgePeople.
setBadgeAttachments(bBadgeAttachments)Sets a new value for property badgeAttachments.
setBadgeNotes(bBadgeNotes)Sets a new value for property badgeNotes.
setBadgePeople(bBadgePeople)Sets a new value for property badgePeople.
Constructor Detail
new sap.m.ObjectIdentifier(sId?, mSettings?)
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 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.Control 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
Event Detail
titlePress(oControlEvent)
Fires when the title is active and the user taps/clicks on it.
Parameters:
{sap.ui.base.Event}oControlEvent
{sap.ui.base.EventProvider}oControlEvent.getSource
{object}oControlEvent.getParameters
{object}oControlEvent.getParameters.domRef DOM reference of the object identifier's title.
Since:
1.26
Method Detail
sap.m.ObjectIdentifier.extend(sClassName, oClassInfo?, FNMetaImpl?): function
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.

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.ObjectIdentifier.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.m.ObjectIdentifier.
Returns:
{sap.ui.base.Metadata} Metadata object describing this class
addAriaLabelledBy(vAriaLabelledBy): sap.m.ObjectIdentifier
Adds some ariaLabelledBy into the association ariaLabelledBy.
Parameters:
{string|sap.ui.core.Control}vAriaLabelledBy the ariaLabelledBy to add; if empty, nothing is inserted
Returns:
{sap.m.ObjectIdentifier} Reference to this in order to allow method chaining
attachTitlePress(oData?, fnFunction, oListener?): sap.m.ObjectIdentifier
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.

Parameters:
{object}oData? An application-specific payload object that will be passed to the event handler along with the event object when firing the event
{function}fnFunction The function to be called when the event occurs
{object}oListener? Context object to call the event handler with. Defaults to this sap.m.ObjectIdentifier itself
Since:
1.26
Returns:
{sap.m.ObjectIdentifier} Reference to this in order to allow method chaining
detachTitlePress(fnFunction, oListener): sap.m.ObjectIdentifier
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.

Parameters:
{function}fnFunction The function to be called, when the event occurs
{object}oListener Context object on which the given function had to be called
Since:
1.26
Returns:
{sap.m.ObjectIdentifier} Reference to this in order to allow method chaining
fireTitlePress(mArguments?): sap.m.ObjectIdentifier
Fires event titlePress to attached listeners.

Expects the following event parameters:

  • domRef of type objectDOM reference of the object identifier's title.
Parameters:
{Map}mArguments? The arguments to pass along with the event
Since:
1.26
Returns:
{sap.m.ObjectIdentifier} Reference to this in order to allow method chaining
getAriaLabelledBy(): sap.ui.core.Control[]
Returns array of IDs of the elements which are the current targets of the association ariaLabelledBy.
Returns:
{sap.ui.core.Control[]}
getText(): string
Gets current value of property text.

Defines the object text.

Returns:
{string} Value of property text
getTextDirection(): sap.ui.core.TextDirection
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.

Since:
1.28.0
Returns:
{sap.ui.core.TextDirection} Value of property textDirection
getTitle(): string
Gets current value of property title.

Defines the object title.

Returns:
{string} Value of property title
getTitleActive(): boolean
Gets current value of property titleActive.

Indicates if the ObjectIdentifier's title is clickable.

Default value is false.

Since:
1.26
Returns:
{boolean} Value of property titleActive
getVisible(): boolean
Gets current value of property visible.

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

Default value is true.

Returns:
{boolean} Value of property visible
removeAllAriaLabelledBy(): sap.ui.core.Control[]
Removes all the controls in the association named ariaLabelledBy.
Returns:
{sap.ui.core.Control[]} An array of the removed elements (might be empty)
removeAriaLabelledBy(vAriaLabelledBy): sap.ui.core.Control
Removes an ariaLabelledBy from the association named ariaLabelledBy.
Parameters:
{int|string|sap.ui.core.Control}vAriaLabelledBy The ariaLabelledByto be removed or its index or ID
Returns:
{sap.ui.core.Control} the removed ariaLabelledBy or null
setText(sText): sap.m.ObjectIdentifier
Sets text. Default value is empty/undefined.
Parameters:
{string}sText New value for property text
Returns:
{sap.m.ObjectIdentifier} this to allow method chaining
setTextDirection(sTextDirection): sap.m.ObjectIdentifier
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.

Parameters:
{sap.ui.core.TextDirection}sTextDirection New value for property textDirection
Since:
1.28.0
Returns:
{sap.m.ObjectIdentifier} Reference to this in order to allow method chaining
setTitle(sTitle): sap.m.ObjectIdentifier
Sets the title. Default value is empty/undefined.
Parameters:
{string}sTitle New value for property title
Returns:
{sap.m.ObjectIdentifier} this to allow method chaining
setTitleActive(bValue): sap.m.ObjectIdentifier
Sets property titleActive. Default value is false.
Parameters:
{boolean}bValue new value for property titleActive
Returns:
{sap.m.ObjectIdentifier} this to allow method chaining
setVisible(bVisible): sap.m.ObjectIdentifier
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.

Parameters:
{boolean}bVisible New value for property visible
Returns:
{sap.m.ObjectIdentifier} Reference to this in order to allow method chaining
getBadgeAttachments(): boolean
Gets current value of property badgeAttachments.

Indicates whether or not the attachments icon is displayed.

Deprecated:
Since version 1.24.0. Will be replaced in the future by a more generic mechanism.
Returns:
{boolean} Value of property badgeAttachments
getBadgeNotes(): boolean
Gets current value of property badgeNotes.

Indicates whether or not the notes icon is displayed.

Deprecated:
Since version 1.24.0. Will be replaced in the future by a more generic mechanism.
Returns:
{boolean} Value of property badgeNotes
getBadgePeople(): boolean
Gets current value of property badgePeople.

Indicates whether or not the address book icon is displayed.

Deprecated:
Since version 1.24.0. Will be replaced in the future by a more generic mechanism.
Returns:
{boolean} Value of property badgePeople
setBadgeAttachments(bBadgeAttachments): sap.m.ObjectIdentifier
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.

Parameters:
{boolean}bBadgeAttachments New value for property badgeAttachments
Deprecated:
Since version 1.24.0. Will be replaced in the future by a more generic mechanism.
Returns:
{sap.m.ObjectIdentifier} Reference to this in order to allow method chaining
setBadgeNotes(bBadgeNotes): sap.m.ObjectIdentifier
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.

Parameters:
{boolean}bBadgeNotes New value for property badgeNotes
Deprecated:
Since version 1.24.0. Will be replaced in the future by a more generic mechanism.
Returns:
{sap.m.ObjectIdentifier} Reference to this in order to allow method chaining
setBadgePeople(bBadgePeople): sap.m.ObjectIdentifier
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.

Parameters:
{boolean}bBadgePeople New value for property badgePeople
Deprecated:
Since version 1.24.0. Will be replaced in the future by a more generic mechanism.
Returns:
{sap.m.ObjectIdentifier} Reference to this in order to allow method chaining