Class sap.m.ObjectStatusModule: sap/m/ObjectStatus

extends Control

Status information that can be either text with a value state, or an icon.
Constructor Summary
new sap.m.ObjectStatus(sId?, mSettings?)Constructor for a new ObjectStatus.
Event Summary
press(oControlEvent)Fires when the user clicks/taps on active text.
Events borrowed from class sap.ui.core.Control
Method Summary
sap.m.ObjectStatus.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.m.ObjectStatus with name sClassName and enriches it with the information contained in oClassInfo.
sap.m.ObjectStatus.getMetadata()Returns a metadata object for class sap.m.ObjectStatus.
addAriaDescribedBy(vAriaDescribedBy)Adds some ariaDescribedBy into the association ariaDescribedBy.
attachPress(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the press event of this sap.m.ObjectStatus.
detachPress(fnFunction, oListener)Detaches event handler fnFunction from the press event of this sap.m.ObjectStatus.
firePress(mParameters?)Fires event press to attached listeners.
getActive()Gets current value of property active.
getAriaDescribedBy()Returns array of IDs of the elements which are the current targets of the association ariaDescribedBy.
getIcon()Gets current value of property icon.
getIconDensityAware()Gets current value of property iconDensityAware.
getState()Gets current value of property state.
getText()Gets current value of property text.
getTextDirection()Gets current value of property textDirection.
getTitle()Gets current value of property title.
removeAllAriaDescribedBy()Removes all the controls in the association named ariaDescribedBy.
removeAriaDescribedBy(vAriaDescribedBy)Removes an ariaDescribedBy from the association named ariaDescribedBy.
setActive(bActive)Sets a new value for property active.
setIcon(sIcon)Sets a new value for property icon.
setIconDensityAware(bIconDensityAware)Sets a new value for property iconDensityAware.
setState(sState)Sets a new value for property state.
setText(sText)Sets the text.
setTextDirection(sTextDirection)Sets a new value for property textDirection.
setTitle(sTitle)Sets the title.
Constructor Detail
new sap.m.ObjectStatus(sId?, mSettings?)

Constructor for a new ObjectStatus.

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

  • Associations

  • 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)
Fires when the user clicks/taps on active text.
Parameters:
sap.ui.base.EventoControlEvent
sap.ui.base.EventProvideroControlEvent.getSource
objectoControlEvent.getParameters
Since:
1.54
Method Detail
sap.m.ObjectStatus.extend(sClassName, oClassInfo?, FNMetaImpl?): function

Creates a new subclass of class sap.m.ObjectStatus 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.ObjectStatus.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.m.ObjectStatus.
Returns:
sap.ui.base.MetadataMetadata object describing this class
addAriaDescribedBy(vAriaDescribedBy): sap.m.ObjectStatus
Adds some ariaDescribedBy into the association ariaDescribedBy.
Parameters:
sap.ui.core.ID|sap.ui.core.ControlvAriaDescribedByThe ariaDescribedBy to add; if empty, nothing is inserted
Returns:
sap.m.ObjectStatusReference to this in order to allow method chaining
attachPress(oData?, fnFunction, oListener?): sap.m.ObjectStatus

Attaches event handler fnFunction to the press event of this sap.m.ObjectStatus.

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.ObjectStatus itself.

Fires when the user clicks/taps on active text.

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.ObjectStatus itself
Returns:
sap.m.ObjectStatusReference to this in order to allow method chaining
Since:
1.54
detachPress(fnFunction, oListener): sap.m.ObjectStatus

Detaches event handler fnFunction from the press event of this sap.m.ObjectStatus.

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.ObjectStatusReference to this in order to allow method chaining
Since:
1.54
firePress(mParameters?): sap.m.ObjectStatus
Fires event press to attached listeners.
Parameters:
objectmParameters?Parameters to pass along with the event
Returns:
sap.m.ObjectStatusReference to this in order to allow method chaining
Since:
1.54
getAccessibilityInfo(): Object
Returns:
ObjectCurrent accessibility state of the control
See:
sap.ui.core.Control#getAccessibilityInfo
getActive(): boolean

Gets current value of property active.

Indicates if the ObjectStatus text and icon can be clicked/tapped by the user.

Note: If you set this property to true, you have to also set the text or icon property.

Default value is false.

Returns:
booleanValue of property active
Since:
1.54
getAriaDescribedBy(): sap.ui.core.ID[]
Returns array of IDs of the elements which are the current targets of the association ariaDescribedBy.
Returns:
sap.ui.core.ID[]
getIcon(): sap.ui.core.URI

Gets current value of property icon.

Icon URI. This may be either an icon font or image path.

Returns:
sap.ui.core.URIValue of property icon
getIconDensityAware(): boolean

Gets current value of property iconDensityAware.

By default, this is set to true but then one or more requests are sent trying to get the density perfect version of image if this version of image doesn't exist on the server.

If bandwidth is key for the application, set this value to false.

Default value is true.

Returns:
booleanValue of property iconDensityAware

Gets current value of property state.

Defines the text value state.

Default value is None.

Returns:
sap.ui.core.ValueStateValue of property state
getText(): string

Gets current value of property text.

Defines the ObjectStatus text.

Returns:
stringValue of property text
getTextDirection(): sap.ui.core.TextDirection

Gets current value of property textDirection.

Determines the direction of the text, not including the title. Available options for the text direction are LTR (left-to-right) and RTL (right-to-left). By default the control inherits the text direction from its parent control.

Default value is Inherit.

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

Gets current value of property title.

Defines the ObjectStatus title.

Returns:
stringValue of property title
removeAllAriaDescribedBy(): sap.ui.core.ID[]
Removes all the controls in the association named ariaDescribedBy.
Returns:
sap.ui.core.ID[]An array of the removed elements (might be empty)
removeAriaDescribedBy(vAriaDescribedBy): sap.ui.core.ID
Removes an ariaDescribedBy from the association named ariaDescribedBy.
Parameters:
int|sap.ui.core.ID|sap.ui.core.ControlvAriaDescribedByThe ariaDescribedBy to be removed or its index or ID
Returns:
sap.ui.core.IDThe removed ariaDescribedBy or null
setActive(bActive): sap.m.ObjectStatus

Sets a new value for property active.

Indicates if the ObjectStatus text and icon can be clicked/tapped by the user.

Note: If you set this property to true, you have to also set the text or icon property.

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

Default value is false.

Parameters:
booleanbActiveNew value for property active
Returns:
sap.m.ObjectStatusReference to this in order to allow method chaining
Since:
1.54
setIcon(sIcon): sap.m.ObjectStatus

Sets a new value for property icon.

Icon URI. This may be either an icon font or image path.

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

Parameters:
sap.ui.core.URIsIconNew value for property icon
Returns:
sap.m.ObjectStatusReference to this in order to allow method chaining
setIconDensityAware(bIconDensityAware): sap.m.ObjectStatus

Sets a new value for property iconDensityAware.

By default, this is set to true but then one or more requests are sent trying to get the density perfect version of image if this version of image doesn't exist on the server.

If bandwidth is key for the application, set this value to false.

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

Default value is true.

Parameters:
booleanbIconDensityAwareNew value for property iconDensityAware
Returns:
sap.m.ObjectStatusReference to this in order to allow method chaining
setState(sState): sap.m.ObjectStatus

Sets a new value for property state.

Defines the text value state.

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

Default value is None.

Parameters:
sap.ui.core.ValueStatesStateNew value for property state
Returns:
sap.m.ObjectStatusReference to this in order to allow method chaining
setText(sText): sap.m.ObjectStatus
Sets the text. The default value is empty/undefined.
Parameters:
stringsTextNew value for property text
Returns:
sap.m.ObjectStatusthis to allow method chaining
setTextDirection(sTextDirection): sap.m.ObjectStatus

Sets a new value for property textDirection.

Determines the direction of the text, not including the title. Available options for the text direction are LTR (left-to-right) and RTL (right-to-left). By default the control inherits the text direction from its parent control.

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.ObjectStatusReference to this in order to allow method chaining
setTitle(sTitle): sap.m.ObjectStatus
Sets the title. The default value is empty/undefined.
Parameters:
stringsTitleNew value for property title
Returns:
sap.m.ObjectStatusthis to allow method chaining