class sap.m.plugins.DataStateIndicator

Visiblity: public
UX Guidelines:
Implements:
Available since: N/A
Module: sap/m/plugins/DataStateIndicator
Application Component: CA-UI5-TBL

This plugin implements a message strip used to show binding-related messages.


Constructor

Constructor for a new DataStateIndicator plugin.

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.plugins.DataStateIndicator(sId?, mSettings?)
Param Type Default Value Description
sId? string

ID for the new DataStateIndicator, generated automatically if no ID is given

mSettings? object

Initial settings for the DataStateIndicator


Properties

Name Type Default Value Description
enableFiltering boolean false

Enables filtering for data state messages if this property is set to true. A link is provided to the user that allows them to filter. After the binding-related messages have been filtered by the user, all the existing filters are only taken into account once the message filter has been cleared again.

Note: This feature must be enabled for OData models only.

Since: 1.89.

Visibility: public
filter function

Defines a predicate to test each message of the data state.

This callback gets called using the message and related control parameters. Return true to keep the message, false otherwise.

Visibility: public

Events Overview

Event Description
applyFilter

This event is fired when the user filters data state messages and if the enableFiltering property is set to true.

Listeners may prevent the default action of this event by calling the preventDefault method on the event object.

Since: 1.89.

clearFilter

This event is fired when the user clears the data state message filter and if the enableFiltering property is set to true.

Listeners may prevent the default action of this event by calling the preventDefault method on the event object.

Since: 1.89.

dataStateChange

This event is fired when the data state of the plugin parent is changed.

Listeners may prevent the default action of this event by calling the preventDefault method on the event object.

applyFilter

This event is fired when the user filters data state messages and if the enableFiltering property is set to true.

Listeners may prevent the default action of this event by calling the preventDefault method on the event object.

Since: 1.89.

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

The filter object representing the entries with messages.

clearFilter

This event is fired when the user clears the data state message filter and if the enableFiltering property is set to true.

Listeners may prevent the default action of this event by calling the preventDefault method on the event object.

Since: 1.89.

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

dataStateChange

This event is fired when the data state of the plugin parent is changed.

Listeners may prevent the default action of this event by calling the preventDefault method on the event object.

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

The data state object.

filteredMessages object[]

The messages (@see sap.ui.core.message.Message) from the current dataState object filtered by the given filter function.


Methods Overview

Method Description
attachApplyFilter

Attaches event handler fnFunction to the applyFilter event of this sap.m.plugins.DataStateIndicator.

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.plugins.DataStateIndicator itself.

This event is fired when the user filters data state messages and if the enableFiltering property is set to true.

attachClearFilter

Attaches event handler fnFunction to the clearFilter event of this sap.m.plugins.DataStateIndicator.

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.plugins.DataStateIndicator itself.

This event is fired when the user clears the data state message filter and if the enableFiltering property is set to true.

attachDataStateChange

Attaches event handler fnFunction to the dataStateChange event of this sap.m.plugins.DataStateIndicator.

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.plugins.DataStateIndicator itself.

This event is fired when the data state of the plugin parent is changed.

detachApplyFilter

Detaches event handler fnFunction from the applyFilter event of this sap.m.plugins.DataStateIndicator.

The passed function and listener object must match the ones used for event registration.

detachClearFilter

Detaches event handler fnFunction from the clearFilter event of this sap.m.plugins.DataStateIndicator.

The passed function and listener object must match the ones used for event registration.

detachDataStateChange

Detaches event handler fnFunction from the dataStateChange event of this sap.m.plugins.DataStateIndicator.

The passed function and listener object must match the ones used for event registration.

sap.m.plugins.DataStateIndicator.extend

Creates a new subclass of class sap.m.plugins.DataStateIndicator 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.Element.extend.

fireApplyFilter

Fires event applyFilter to attached listeners.

Listeners may prevent the default action of this event by calling the preventDefault method on the event object. The return value of this method indicates whether the default action should be executed.

fireClearFilter

Fires event clearFilter to attached listeners.

Listeners may prevent the default action of this event by calling the preventDefault method on the event object. The return value of this method indicates whether the default action should be executed.

fireDataStateChange

Fires event dataStateChange to attached listeners.

Listeners may prevent the default action of this event by calling the preventDefault method on the event object. The return value of this method indicates whether the default action should be executed.

getEnableFiltering

Gets current value of property enableFiltering.

Enables filtering for data state messages if this property is set to true. A link is provided to the user that allows them to filter. After the binding-related messages have been filtered by the user, all the existing filters are only taken into account once the message filter has been cleared again.

Note: This feature must be enabled for OData models only.

Default value is false.

getFilter

Gets current value of property filter.

Defines a predicate to test each message of the data state.

This callback gets called using the message and related control parameters. Return true to keep the message, false otherwise.

sap.m.plugins.DataStateIndicator.getMetadata

Returns a metadata object for class sap.m.plugins.DataStateIndicator.

isFiltering

Return whether message filtering is active or not.

refresh

Refreshes the messages displayed for the current data state. The current data state is evaluated again, and the filters are applied.

setEnableFiltering

Sets a new value for property enableFiltering.

Enables filtering for data state messages if this property is set to true. A link is provided to the user that allows them to filter. After the binding-related messages have been filtered by the user, all the existing filters are only taken into account once the message filter has been cleared again.

Note: This feature must be enabled for OData models only.

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

Default value is false.

setFilter

Sets a new value for property filter.

Defines a predicate to test each message of the data state.

This callback gets called using the message and related control parameters. Return true to keep the message, false otherwise.

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

showMessage

Shows a message.

attachApplyFilter

Attaches event handler fnFunction to the applyFilter event of this sap.m.plugins.DataStateIndicator.

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.plugins.DataStateIndicator itself.

This event is fired when the user filters data state messages and if the enableFiltering property is set to true.

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.plugins.DataStateIndicator itself

attachClearFilter

Attaches event handler fnFunction to the clearFilter event of this sap.m.plugins.DataStateIndicator.

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.plugins.DataStateIndicator itself.

This event is fired when the user clears the data state message filter and if the enableFiltering property is set to true.

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.plugins.DataStateIndicator itself

attachDataStateChange

Attaches event handler fnFunction to the dataStateChange event of this sap.m.plugins.DataStateIndicator.

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.plugins.DataStateIndicator itself.

This event is fired when the data state of the plugin parent is changed.

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.plugins.DataStateIndicator itself

detachApplyFilter

Detaches event handler fnFunction from the applyFilter event of this sap.m.plugins.DataStateIndicator.

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

detachClearFilter

Detaches event handler fnFunction from the clearFilter event of this sap.m.plugins.DataStateIndicator.

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

detachDataStateChange

Detaches event handler fnFunction from the dataStateChange event of this sap.m.plugins.DataStateIndicator.

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.plugins.DataStateIndicator.extend

Creates a new subclass of class sap.m.plugins.DataStateIndicator 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.Element.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

fireApplyFilter

Fires event applyFilter to attached listeners.

Listeners may prevent the default action of this event by calling the preventDefault method on the event object. The return value of this method indicates whether the default action should be executed.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

filter sap.ui.model.Filter

The filter object representing the entries with messages.

fireClearFilter

Fires event clearFilter to attached listeners.

Listeners may prevent the default action of this event by calling the preventDefault method on the event object. The return value of this method indicates whether the default action should be executed.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

fireDataStateChange

Fires event dataStateChange to attached listeners.

Listeners may prevent the default action of this event by calling the preventDefault method on the event object. The return value of this method indicates whether the default action should be executed.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

dataState sap.ui.model.DataState

The data state object.

filteredMessages object[]

The messages (@see sap.ui.core.message.Message) from the current dataState object filtered by the given filter function.

getEnableFiltering

Gets current value of property enableFiltering.

Enables filtering for data state messages if this property is set to true. A link is provided to the user that allows them to filter. After the binding-related messages have been filtered by the user, all the existing filters are only taken into account once the message filter has been cleared again.

Note: This feature must be enabled for OData models only.

Default value is false.

getFilter

Gets current value of property filter.

Defines a predicate to test each message of the data state.

This callback gets called using the message and related control parameters. Return true to keep the message, false otherwise.

sap.m.plugins.DataStateIndicator.getMetadata

Returns a metadata object for class sap.m.plugins.DataStateIndicator.

isFiltering

Return whether message filtering is active or not.

refresh

Refreshes the messages displayed for the current data state. The current data state is evaluated again, and the filters are applied.

setEnableFiltering

Sets a new value for property enableFiltering.

Enables filtering for data state messages if this property is set to true. A link is provided to the user that allows them to filter. After the binding-related messages have been filtered by the user, all the existing filters are only taken into account once the message filter has been cleared again.

Note: This feature must be enabled for OData models only.

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
bEnableFiltering boolean false

New value for property enableFiltering

setFilter

Sets a new value for property filter.

Defines a predicate to test each message of the data state.

This callback gets called using the message and related control parameters. Return true to keep the message, false otherwise.

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

Param Type DefaultValue Description
fnFilter function

New value for property filter

showMessage

Shows a message.

Param Type DefaultValue Description
sText string

The message text, if empty, the message is hidden

sType sap.ui.core.ValueState

The message type