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(mParameters?)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:
stringsId?ID for the new control, generated automatically if no ID is given
objectmSettings?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.EventoControlEvent
sap.ui.base.EventProvideroControlEvent.getSource
objectoControlEvent.getParameters
objectoControlEvent.getParameters.domRefDOM 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:
stringsClassNameName of the class being created
objectoClassInfo?Object literal with information about the class
functionFNMetaImpl?Constructor function for the metadata object; if not given, it defaults to sap.ui.core.ElementMetadata
Returns:
functionCreated class / constructor function
sap.m.ObjectIdentifier.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.m.ObjectIdentifier.
Returns:
sap.ui.base.MetadataMetadata object describing this class
addAriaLabelledBy(vAriaLabelledBy): sap.m.ObjectIdentifier
Adds some ariaLabelledBy into the association ariaLabelledBy.
Parameters:
sap.ui.core.ID|sap.ui.core.ControlvAriaLabelledBythe ariaLabelledBy to add; if empty, nothing is inserted
Returns:
sap.m.ObjectIdentifierReference 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:
objectoData?An application-specific payload object that will be passed to the event handler along with the event object when firing the event
functionfnFunctionThe function to be called when the event occurs
objectoListener?Context object to call the event handler with. Defaults to this sap.m.ObjectIdentifier itself
Returns:
sap.m.ObjectIdentifierReference to this in order to allow method chaining
Since:
1.26
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:
functionfnFunctionThe function to be called, when the event occurs
objectoListenerContext object on which the given function had to be called
Returns:
sap.m.ObjectIdentifierReference to this in order to allow method chaining
Since:
1.26
fireTitlePress(mParameters?): sap.m.ObjectIdentifier
Fires event titlePress to attached listeners.
Parameters:
objectmParameters?Parameters to pass along with the event
objectmParameters.domRef?DOM reference of the object identifier's title.
Returns:
sap.m.ObjectIdentifierReference to this in order to allow method chaining
Since:
1.26
getAriaLabelledBy(): sap.ui.core.ID[]
Returns array of IDs of the elements which are the current targets of the association ariaLabelledBy.
Returns:
sap.ui.core.ID[]
getText(): string

Gets current value of property text.

Defines the object text.

Returns:
stringValue 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.

Returns:
sap.ui.core.TextDirectionValue of property textDirection
Since:
1.28.0
getTitle(): string

Gets current value of property title.

Defines the object title.

Returns:
stringValue of property title
getTitleActive(): boolean

Gets current value of property titleActive.

Indicates if the ObjectIdentifier's title is clickable.

Default value is false.

Returns:
booleanValue of property titleActive
Since:
1.26
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:
booleanValue of property visible
removeAllAriaLabelledBy(): sap.ui.core.ID[]
Removes all the controls in the association named ariaLabelledBy.
Returns:
sap.ui.core.ID[]An array of the removed elements (might be empty)
removeAriaLabelledBy(vAriaLabelledBy): sap.ui.core.ID
Removes an ariaLabelledBy from the association named ariaLabelledBy.
Parameters:
int|sap.ui.core.ID|sap.ui.core.ControlvAriaLabelledByThe ariaLabelledBy to be removed or its index or ID
Returns:
sap.ui.core.IDThe removed ariaLabelledBy or null
setText(sText): sap.m.ObjectIdentifier
Sets text. Default value is empty/undefined.
Parameters:
stringsTextNew value for property text
Returns:
sap.m.ObjectIdentifierthis 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.TextDirectionsTextDirectionNew value for property textDirection
Returns:
sap.m.ObjectIdentifierReference to this in order to allow method chaining
Since:
1.28.0
setTitle(sTitle): sap.m.ObjectIdentifier
Sets the title. Default value is empty/undefined.
Parameters:
stringsTitleNew value for property title
Returns:
sap.m.ObjectIdentifierthis to allow method chaining
setTitleActive(bValue): sap.m.ObjectIdentifier
Sets property titleActive. Default value is false.
Parameters:
booleanbValuenew value for property titleActive
Returns:
sap.m.ObjectIdentifierthis 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:
booleanbVisibleNew value for property visible
Returns:
sap.m.ObjectIdentifierReference 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.

Returns:
booleanValue of property badgeAttachments
Deprecated API:
Since version 1.24.0. Will be replaced in the future by a more generic mechanism.
getBadgeNotes(): boolean

Gets current value of property badgeNotes.

Indicates whether or not the notes icon is displayed.

Returns:
booleanValue of property badgeNotes
Deprecated API:
Since version 1.24.0. Will be replaced in the future by a more generic mechanism.
getBadgePeople(): boolean

Gets current value of property badgePeople.

Indicates whether or not the address book icon is displayed.

Returns:
booleanValue of property badgePeople
Deprecated API:
Since version 1.24.0. Will be replaced in the future by a more generic mechanism.
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:
booleanbBadgeAttachmentsNew value for property badgeAttachments
Returns:
sap.m.ObjectIdentifierReference to this in order to allow method chaining
Deprecated API:
Since version 1.24.0. Will be replaced in the future by a more generic mechanism.
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:
booleanbBadgeNotesNew value for property badgeNotes
Returns:
sap.m.ObjectIdentifierReference to this in order to allow method chaining
Deprecated API:
Since version 1.24.0. Will be replaced in the future by a more generic mechanism.
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:
booleanbBadgePeopleNew value for property badgePeople
Returns:
sap.m.ObjectIdentifierReference to this in order to allow method chaining
Deprecated API:
Since version 1.24.0. Will be replaced in the future by a more generic mechanism.