This plugin implements a message strip used to show binding-related messages.
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 |
|
mSettings? | object | Initial settings for the |
Name | Type | Default Value | Description |
---|---|---|---|
enableFiltering | boolean | false | Enables filtering for data state messages if this property is set to Note: This feature must be enabled for OData models only. |
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 |
Event | Description |
---|---|
applyFilter |
This event is fired when the user filters data state messages and if the Listeners may prevent the default action of this event by calling the |
clearFilter |
This event is fired when the user clears the data state message filter and if the Listeners may prevent the default action of this event by calling the |
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 |
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. |
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 |
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 |
Method | Description |
---|---|
attachApplyFilter |
Attaches event handler When called, the context of the event handler (its This event is fired when the user filters data state messages and if the |
attachClearFilter |
Attaches event handler When called, the context of the event handler (its This event is fired when the user clears the data state message filter and if the |
attachDataStateChange |
Attaches event handler When called, the context of the event handler (its This event is fired when the data state of the plugin parent is changed. |
detachApplyFilter |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachClearFilter |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachDataStateChange |
Detaches event handler 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
|
fireApplyFilter |
Fires event applyFilter to attached listeners. Listeners may prevent the default action of this event by calling the |
fireClearFilter |
Fires event clearFilter to attached listeners. Listeners may prevent the default action of this event by calling the |
fireDataStateChange |
Fires event dataStateChange to attached listeners. Listeners may prevent the default action of this event by calling the |
getEnableFiltering |
Gets current value of property enableFiltering. Enables filtering for data state messages if this property is set to Note: This feature must be enabled for OData models only. Default value is |
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 |
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 Note: This feature must be enabled for OData models only. When called with a value of Default value is |
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 When called with a value of |
showMessage |
Shows a message. |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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. |
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 |
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 |
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
.
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.
Returns a metadata object for class sap.m.plugins.DataStateIndicator.
Refreshes the messages displayed for the current data state. The current data state is evaluated again, and the filters are applied.
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 |
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 |
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 |