class sap.ui.ux3.Notifier

Control sample: sap.ui.ux3.Notifier
Visiblity: public
UX Guidelines:
Implements:
Available since: N/A
Module: sap/ui/ux3/Notifier
Application Component: CA-UI5-CTR

This element can be docked to a notification bar to show notification items


Constructor

Constructor for a new Notifier.

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.ui.ux3.Notifier(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
icon sap.ui.core.URI

Icon of the control that should be displayed within the corresponding bar

Visibility: public
title string

Defines the title that should be displayed within the opening popup

Visibility: public

Aggregations

Default Aggregation:

Name Cardinality Type Description
messages 0..n sap.ui.core.Message

Messages of this notifier.

views 0..n sap.ui.core.Control

Views aggregated with this Notifier and managed by the parent NotificationBar.


Events Overview

Event Description
messageSelected

Event is fired when a message of the notifiers was selected.

messageSelected

Event is fired when a message of the notifiers was selected.

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

The message that was selected

notifier sap.ui.ux3.Notifier

The notifier that contains the selected message


Methods Overview

Method Description
addMessage

Adds some message to the aggregation messages.

attachMessageSelected

Attaches event handler fnFunction to the messageSelected event of this sap.ui.ux3.Notifier.

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.ui.ux3.Notifier itself.

Event is fired when a message of the notifiers was selected.

destroyMessages

Destroys all the messages in the aggregation messages.

detachMessageSelected

Detaches event handler fnFunction from the messageSelected event of this sap.ui.ux3.Notifier.

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

sap.ui.ux3.Notifier.extend

Creates a new subclass of class sap.ui.ux3.Notifier 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.

fireMessageSelected

Fires event messageSelected to attached listeners.

getIcon

Gets current value of property icon.

Icon of the control that should be displayed within the corresponding bar

getMessages

Gets content of aggregation messages.

Messages of this notifier.

sap.ui.ux3.Notifier.getMetadata

Returns a metadata object for class sap.ui.ux3.Notifier.

getTitle

Gets current value of property title.

Defines the title that should be displayed within the opening popup

hasItems

This method checks if the notifier has any items.

indexOfMessage

Checks for the provided sap.ui.core.Message in the aggregation messages. and returns its index if found or -1 otherwise.

insertMessage

Inserts a message into the aggregation messages.

removeAllMessages

Removes all the controls from the aggregation messages.

Additionally, it unregisters them from the hosting UIArea.

removeMessage

Removes a message from the aggregation messages.

setIcon

Sets a new value for property icon.

Icon of the control that should be displayed within the corresponding bar

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

setTitle

Sets a new value for property title.

Defines the title that should be displayed within the opening popup

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

addMessage

Adds some message to the aggregation messages.

Param Type DefaultValue Description
oMessage sap.ui.core.Message

The message to add; if empty, nothing is inserted

attachMessageSelected

Attaches event handler fnFunction to the messageSelected event of this sap.ui.ux3.Notifier.

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.ui.ux3.Notifier itself.

Event is fired when a message of the notifiers was selected.

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.ui.ux3.Notifier itself

destroyMessages

Destroys all the messages in the aggregation messages.

detachMessageSelected

Detaches event handler fnFunction from the messageSelected event of this sap.ui.ux3.Notifier.

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.ui.ux3.Notifier.extend

Creates a new subclass of class sap.ui.ux3.Notifier 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

fireMessageSelected

Fires event messageSelected to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

message sap.ui.core.Message

The message that was selected

notifier sap.ui.ux3.Notifier

The notifier that contains the selected message

getIcon

Gets current value of property icon.

Icon of the control that should be displayed within the corresponding bar

getMessages

Gets content of aggregation messages.

Messages of this notifier.

sap.ui.ux3.Notifier.getMetadata

Returns a metadata object for class sap.ui.ux3.Notifier.

getTitle

Gets current value of property title.

Defines the title that should be displayed within the opening popup

hasItems

This method checks if the notifier has any items.

indexOfMessage

Checks for the provided sap.ui.core.Message in the aggregation messages. and returns its index if found or -1 otherwise.

Param Type DefaultValue Description
oMessage sap.ui.core.Message

The message whose index is looked for

insertMessage

Inserts a message into the aggregation messages.

Param Type DefaultValue Description
oMessage sap.ui.core.Message

The message to insert; if empty, nothing is inserted

iIndex int

The 0-based index the message should be inserted at; for a negative value of iIndex, the message is inserted at position 0; for a value greater than the current size of the aggregation, the message is inserted at the last position

removeAllMessages

Removes all the controls from the aggregation messages.

Additionally, it unregisters them from the hosting UIArea.

removeMessage

Removes a message from the aggregation messages.

Param Type DefaultValue Description
vMessage int string sap.ui.core.Message

The message to remove or its index or id

setIcon

Sets a new value for property icon.

Icon of the control that should be displayed within the corresponding bar

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

setTitle

Sets a new value for property title.

Defines the title that should be displayed within the opening popup

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