Class sap.m.ObjectMarkerModule: sap/m/ObjectMarker

extends Control

The sap.m.ObjectMarker control represents one of the following predefined types:

  • Flagged
  • Favorite
  • Draft
  • Locked
  • LockedBy
  • Unsaved
  • UnsavedBy

Note: Use the 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.


Since: 1.38.
Constructor Summary
new sap.m.ObjectMarker(sId?, mSettings?)Constructor for a new ObjectMarker.
Event Summary
press(oControlEvent)Event is fired when the ObjectMarker is interactive and the user taps/clicks on it.
Events borrowed from class sap.ui.core.Control
Method Summary
sap.m.ObjectMarker.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.m.ObjectMarker with name sClassName and enriches it with the information contained in oClassInfo.
sap.m.ObjectMarker.getMetadata()Returns a metadata object for class sap.m.ObjectMarker.
firePress(mParameters?)Fires event press to attached listeners.
getAdditionalInfo()Gets current value of property additionalInfo.
getType()Gets current value of property type.
getVisibility()Gets current value of property visibility.
setAdditionalInfo(sAdditionalInfo)Sets a new value for property additionalInfo.
setType(sType)Sets a new value for property type.
setVisibility(sVisibility)Sets a new value for property visibility.
Constructor Detail
new sap.m.ObjectMarker(sId?, mSettings?)

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 for a general description of the syntax of the settings object.

The supported settings are:

  • Properties

  • Aggregations

    • Events

      • press : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]

    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
    press(oControlEvent)
    Event is fired when the ObjectMarker is interactive and the user taps/clicks on it.
    Parameters:
    sap.ui.base.EventoControlEvent
    sap.ui.base.EventProvideroControlEvent.getSource
    objectoControlEvent.getParameters
    Method Detail
    sap.m.ObjectMarker.extend(sClassName, oClassInfo?, FNMetaImpl?): function

    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.

    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.ObjectMarker.getMetadata(): sap.ui.base.Metadata
    Returns a metadata object for class sap.m.ObjectMarker.
    Returns:
    sap.ui.base.MetadataMetadata object describing this class
    firePress(mParameters?): sap.m.ObjectMarker
    Fires event press to attached listeners.
    Parameters:
    objectmParameters?Parameters to pass along with the event
    Returns:
    sap.m.ObjectMarkerReference to this in order to allow method chaining
    getAdditionalInfo(): string

    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 .

    Returns:
    stringValue of property additionalInfo

    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:

    • For Flagged and Favorite the icon is visible and the text is not displayed
    • For Draft the text is visible and the icon is not displayed
    • For Locked, LockedBy, Unsaved and UnsavedBy - on screens larger than 600px both icon and text are visible, otherwise only the icon
    Returns:
    sap.m.ObjectMarkerTypeValue of property type

    Gets current value of property visibility.

    Sets one of the visibility states. Visibility states are as follows:

    • IconOnly - displays only icon, regardless of the screen size
    • TextOnly - displays only text, regardless of the screen size
    • IconAndText - displays both icon and text, regardless of the screen size
    Returns:
    sap.m.ObjectMarkerVisibilityValue of property visibility
    setAdditionalInfo(sAdditionalInfo): sap.m.ObjectMarker

    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 .

    Parameters:
    stringsAdditionalInfoNew value for property additionalInfo
    Returns:
    sap.m.ObjectMarkerReference to this in order to allow method chaining
    setType(sType): sap.m.ObjectMarker

    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:

    • For Flagged and Favorite the icon is visible and the text is not displayed
    • For Draft the text is visible and the icon is not displayed
    • For Locked, LockedBy, Unsaved and UnsavedBy - on screens larger than 600px both icon and text are visible, otherwise only the icon

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

    Parameters:
    sap.m.ObjectMarkerTypesTypeNew value for property type
    Returns:
    sap.m.ObjectMarkerReference to this in order to allow method chaining
    setVisibility(sVisibility): sap.m.ObjectMarker

    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 size
    • TextOnly - displays only text, regardless of the screen size
    • IconAndText - displays both icon and text, regardless of the screen size

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

    Parameters:
    sap.m.ObjectMarkerVisibilitysVisibilityNew value for property visibility
    Returns:
    sap.m.ObjectMarkerReference to this in order to allow method chaining