The sap.m.ObjectMarker
control represents one of the following predefined types:
Flagged
Favorite
Draft
Locked
LockedBy
Unsaved
UnsavedBy
LockedBy/UnsavedBy
type along with the additionalInfo
property to display the name of the user who locked/changed the object. If additionalInfo
property is not set when using LockedBy/UnsavedBy
types, the string "Locked by another user"/"Unsaved changes by another user" will be displayed. If you don't want to display name of the user, simply use the Locked/Unsaved
types.
Constructor for a new ObjectMarker.
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.ObjectMarker(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 |
---|---|---|---|
additionalInfo | string | empty string | Sets additional information to the displayed Note: If no type is set, the additional information will not be displayed. Visibility: public |
type | sap.m.ObjectMarkerType | Sets one of the predefined types. Note: If the
|
|
visibility | sap.m.ObjectMarkerVisibility | Sets one of the visibility states. Visibility states are as follows:
|
Default Aggregation:
Name | Cardinality | Type | Description |
---|---|---|---|
_innerControl | 0..1 | sap.ui.core.Control |
Internal control that should be |
Name | Cardinality | Type | Description |
---|---|---|---|
ariaDescribedBy | 0..n | sap.ui.core.Control |
Association to controls / ids which describe this control (see WAI-ARIA attribute aria-describedby). |
ariaLabelledBy | 0..n | sap.ui.core.Control |
Association to controls / ids which label this control (see WAI-ARIA attribute aria-labelledby). |
Event | Description |
---|---|
press |
Event is fired when the |
Method | Description |
---|---|
addAriaDescribedBy |
Adds some ariaDescribedBy into the association ariaDescribedBy. |
addAriaLabelledBy |
Adds some ariaLabelledBy into the association ariaLabelledBy. |
attachPress |
Attaches event handler When called, the context of the event handler (its Event is fired when the |
detachPress |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
sap.m.ObjectMarker.extend |
Creates a new subclass of class sap.m.ObjectMarker with name
|
firePress |
Fires event press to attached listeners. |
getAdditionalInfo |
Gets current value of property additionalInfo. Sets additional information to the displayed Note: If no type is set, the additional information will not be displayed. Default value is |
getAriaDescribedBy |
Returns array of IDs of the elements which are the current targets of the association ariaDescribedBy. |
getAriaLabelledBy |
Returns array of IDs of the elements which are the current targets of the association ariaLabelledBy. |
sap.m.ObjectMarker.getMetadata |
Returns a metadata object for class sap.m.ObjectMarker. |
getType |
Gets current value of property type. Sets one of the predefined types. Note: If the
|
getVisibility |
Gets current value of property visibility. Sets one of the visibility states. Visibility states are as follows:
|
removeAllAriaDescribedBy |
Removes all the controls in the association named ariaDescribedBy. |
removeAllAriaLabelledBy |
Removes all the controls in the association named ariaLabelledBy. |
removeAriaDescribedBy |
Removes an ariaDescribedBy from the association named ariaDescribedBy. |
removeAriaLabelledBy |
Removes an ariaLabelledBy from the association named ariaLabelledBy. |
setAdditionalInfo |
Sets a new value for property additionalInfo. Sets additional information to the displayed Note: If no type is set, the additional information will not be displayed. When called with a value of Default value is |
setType |
Sets a new value for property type. Sets one of the predefined types. Note: If the
When called with a value of |
setVisibility |
Sets a new value for property visibility. Sets one of the visibility states. Visibility states are as follows:
When called with a value of |
Adds some ariaDescribedBy into the association ariaDescribedBy.
Param | Type | DefaultValue | Description |
---|---|---|---|
vAriaDescribedBy | sap.ui.core.ID sap.ui.core.Control |
The ariaDescribedBy to add; if empty, nothing is inserted |
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 |
Attaches event handler fnFunction
to the press event of this sap.m.ObjectMarker
.
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.ObjectMarker
itself.
Event is fired when the ObjectMarker
is interactive 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 |
Detaches event handler fnFunction
from the press event of this sap.m.ObjectMarker
.
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 |
Creates a new subclass of class sap.m.ObjectMarker 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 |
Fires event press to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
Gets current value of property additionalInfo.
Sets additional information to the displayed type
.
Note: If no type is set, the additional information will not be displayed.
Default value is empty string
.
Returns array of IDs of the elements which are the current targets of the association ariaDescribedBy.
Returns array of IDs of the elements which are the current targets of the association ariaLabelledBy.
Gets current value of property type.
Sets one of the predefined types.
Note: If the visibility
property is not specified explicitly, every type
comes with predefined one as follows:
Flagged
and Favorite
the icon is visible and the text is not displayedDraft
the text is visible and the icon is not displayedLocked
, LockedBy
, Unsaved
and UnsavedBy
- on screens larger than 600px both icon and text are visible, otherwise only the iconGets current value of property visibility.
Sets one of the visibility states. Visibility states are as follows:
IconOnly
- displays only icon, regardless of the screen sizeTextOnly
- displays only text, regardless of the screen sizeIconAndText
- displays both icon and text, regardless of the screen sizeRemoves an ariaDescribedBy from the association named ariaDescribedBy.
Param | Type | DefaultValue | Description |
---|---|---|---|
vAriaDescribedBy | int sap.ui.core.ID sap.ui.core.Control |
The ariaDescribedBy to be removed or its index or ID |
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 |
Sets a new value for property additionalInfo.
Sets additional information to the displayed type
.
Note: If no type is set, the additional information will not be displayed.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is empty string
.
Param | Type | DefaultValue | Description |
---|---|---|---|
sAdditionalInfo | string | "" |
New value for property |
Sets a new value for property type.
Sets one of the predefined types.
Note: If the visibility
property is not specified explicitly, every type
comes with predefined one as follows:
Flagged
and Favorite
the icon is visible and the text is not displayedDraft
the text is visible and the icon is not displayedLocked
, LockedBy
, Unsaved
and UnsavedBy
- on screens larger than 600px both icon and text are visible, otherwise only the iconWhen called with a value of null
or undefined
, the default value of the property will be restored.
Param | Type | DefaultValue | Description |
---|---|---|---|
sType | sap.m.ObjectMarkerType |
New value for property |
Sets a new value for property visibility.
Sets one of the visibility states. Visibility states are as follows:
IconOnly
- displays only icon, regardless of the screen sizeTextOnly
- displays only text, regardless of the screen sizeIconAndText
- displays both icon and text, regardless of the screen sizeWhen called with a value of null
or undefined
, the default value of the property will be restored.
Param | Type | DefaultValue | Description |
---|---|---|---|
sVisibility | sap.m.ObjectMarkerVisibility |
New value for property |