class sap.m.ObjectStatus

Control sample: sap.m.ObjectStatus
Visiblity: public
UX Guidelines: Object Status
Implements: sap.ui.core.IFormContent
Available since: N/A
Module: sap/m/ObjectStatus
Application Component: CA-UI5-CTR

Status information that can be either text with a value state, or an icon.

With 1.63, large design of the control is supported by setting sapMObjectStatusLarge CSS class to the ObjectStatus.

This control can be a drag source.

Constructor

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

new sap.m.ObjectStatus(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


Properties

Name Type Default Value Description
active boolean false

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.

Since: 1.54.

Visibility: public
emptyIndicatorMode sap.m.EmptyIndicatorMode Off

Specifies if an empty indicator should be displayed when there is no text.

Since: 1.89.

Visibility: public
icon sap.ui.core.URI

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

Visibility: public
iconDensityAware boolean true

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.

Visibility: public
inverted boolean false

Determines whether the background color reflects the set state instead of the control's text.

Since: 1.66.

Visibility: public
state string sap.ui.core.ValueState.None

Defines the text value state. The allowed values are from the enum type sap.ui.core.ValueState. Since version 1.66 the state property also accepts values from enum type sap.ui.core.IndicationColor.

Visibility: public
text string

Defines the ObjectStatus text.

Visibility: public
textDirection sap.ui.core.TextDirection Inherit

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.

Visibility: public
title string

Defines the ObjectStatus title.

Visibility: public

Associations

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).


Events Overview

Event Description
press

Fires when the user clicks/taps on active text.

Since: 1.54.

press

Fires when the user clicks/taps on active text.

Since: 1.54.

Param Type Description
oControlEvent sap.ui.base.Event
getSource sap.ui.base.EventProvider
getParameters object

Methods Overview

Method Description
addAriaDescribedBy

Adds some ariaDescribedBy into the association ariaDescribedBy.

attachPress

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.

detachPress

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.

sap.m.ObjectStatus.extend

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.

firePress

Fires event press to attached listeners.

getAccessibilityInfo

References:

  • sap.ui.core.Control#getAccessibilityInfo

getActive

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.

getAriaDescribedBy

Returns array of IDs of the elements which are the current targets of the association ariaDescribedBy.

getEmptyIndicatorMode

Gets current value of property emptyIndicatorMode.

Specifies if an empty indicator should be displayed when there is no text.

Default value is Off.

getIcon

Gets current value of property icon.

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

getIconDensityAware

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.

getInverted

Gets current value of property inverted.

Determines whether the background color reflects the set state instead of the control's text.

Default value is false.

sap.m.ObjectStatus.getMetadata

Returns a metadata object for class sap.m.ObjectStatus.

getState

Gets current value of property state.

Defines the text value state. The allowed values are from the enum type sap.ui.core.ValueState. Since version 1.66 the state property also accepts values from enum type sap.ui.core.IndicationColor.

Default value is ValueState.None.

getText

Gets current value of property text.

Defines the ObjectStatus text.

getTextDirection

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.

getTitle

Gets current value of property title.

Defines the ObjectStatus title.

removeAllAriaDescribedBy

Removes all the controls in the association named ariaDescribedBy.

removeAriaDescribedBy

Removes an ariaDescribedBy from the association named ariaDescribedBy.

setActive

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.

setEmptyIndicatorMode

Sets a new value for property emptyIndicatorMode.

Specifies if an empty indicator should be displayed when there is no text.

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

Default value is Off.

setIcon

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.

setIconDensityAware

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.

setInverted

Sets a new value for property inverted.

Determines whether the background color reflects the set state instead of the control's text.

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

Default value is false.

setState

Sets value for the state property. The default value is ValueState.None.

setText

Sets a new value for property text.

Defines the ObjectStatus text.

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

setTextDirection

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.

setTitle

Sets a new value for property title.

Defines the ObjectStatus title.

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

addAriaDescribedBy

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

attachPress

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.

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

detachPress

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.

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

sap.m.ObjectStatus.extend

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.

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

firePress

Fires event press to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

getAccessibilityInfo

References:

getActive

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.

getAriaDescribedBy

Returns array of IDs of the elements which are the current targets of the association ariaDescribedBy.

getEmptyIndicatorMode

Gets current value of property emptyIndicatorMode.

Specifies if an empty indicator should be displayed when there is no text.

Default value is Off.

getIcon

Gets current value of property icon.

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

getIconDensityAware

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.

getInverted

Gets current value of property inverted.

Determines whether the background color reflects the set state instead of the control's text.

Default value is false.

sap.m.ObjectStatus.getMetadata

Returns a metadata object for class sap.m.ObjectStatus.

getState

Gets current value of property state.

Defines the text value state. The allowed values are from the enum type sap.ui.core.ValueState. Since version 1.66 the state property also accepts values from enum type sap.ui.core.IndicationColor.

Default value is ValueState.None.

getText

Gets current value of property text.

Defines the ObjectStatus text.

getTextDirection

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.

getTitle

Gets current value of property title.

Defines the ObjectStatus title.

removeAllAriaDescribedBy

Removes all the controls in the association named ariaDescribedBy.

removeAriaDescribedBy

Removes 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

setActive

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.

Param Type DefaultValue Description
bActive boolean false

New value for property active

setEmptyIndicatorMode

Sets a new value for property emptyIndicatorMode.

Specifies if an empty indicator should be displayed when there is no text.

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

Default value is Off.

Param Type DefaultValue Description
sEmptyIndicatorMode sap.m.EmptyIndicatorMode Off

New value for property emptyIndicatorMode

setIcon

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.

Param Type DefaultValue Description
sIcon sap.ui.core.URI

New value for property icon

setIconDensityAware

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.

Param Type DefaultValue Description
bIconDensityAware boolean true

New value for property iconDensityAware

setInverted

Sets a new value for property inverted.

Determines whether the background color reflects the set state instead of the control's text.

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

Default value is false.

Param Type DefaultValue Description
bInverted boolean false

New value for property inverted

setState

Sets value for the state property. The default value is ValueState.None.

Param Type DefaultValue Description
sValue string

New value for property state. It should be valid value of enumeration sap.ui.core.ValueState or sap.ui.core.IndicationColor

setText

Sets a new value for property text.

Defines the ObjectStatus text.

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

Param Type DefaultValue Description
sText string

New value for property text

setTextDirection

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.

Param Type DefaultValue Description
sTextDirection sap.ui.core.TextDirection Inherit

New value for property textDirection

setTitle

Sets a new value for property title.

Defines the ObjectStatus title.

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

Param Type DefaultValue Description
sTitle string

New value for property title