namespace sap.ui.core.message

Control sample: sap.ui.core.message
Visiblity: public
Available since: N/A
Module: sap/ui/core/message/MessageProcessor
Application Component: CA-UI5-COR

Nodes Overview

Node Description
sap.ui.core.message.ControlMessageProcessor

The ControlMessageProcessor implementation.

sap.ui.core.message.Message
sap.ui.core.message.MessageManager
sap.ui.core.message.MessageParser

This is an abstract base class for MessageParser objects.

sap.ui.core.message.MessageProcessor

This is an abstract base class for MessageProcessor objects.


Methods Overview

Method Description
Name Type Default Value Description icon sap.ui.core.URI

A possible icon URI of the message

Visibility: public level sap.ui.core.MessageType None

Setting the message's level.

Visibility: public readOnly boolean false

Determines whether the message should be read only. This helps the application to handle a message a different way if the application differentiates between read-only and common messages.

Since: 1.19.0.

Visibility: public text string

Message text

Visibility: public timestamp string

Message's timestamp. It is just a simple String that will be used without any transformation. So the application that uses messages needs to format the timestamp to its own needs.

Visibility: public

Borrowed Aggregations

Name Cardinality Type Description
customData 0..n sap.ui.core.CustomData

Custom Data, a data structure like a map containing arbitrary key value pairs.

dependents 0..n sap.ui.core.Element

Dependents are not rendered, but their databinding context and lifecycle are bound to the aggregating Element.

Since: 1.19.

dragDropConfig 0..n sap.ui.core.dnd.DragDropBase

Defines the drag-and-drop configuration. Note: This configuration might be ignored due to control metadata restrictions.

Since: 1.56.

layoutData 0..1 sap.ui.core.LayoutData

Defines the layout constraints for this control when it is used inside a Layout. LayoutData classes are typed classes and must match the embedding Layout. See VariantLayoutData for aggregating multiple alternative LayoutData instances to a single Element.

tooltip 0..1 sap.ui.core.TooltipBase

The tooltip that should be shown for this Element.

In the most simple case, a tooltip is a string that will be rendered by the control and displayed by the browser when the mouse pointer hovers over the control's DOM. In this variant, tooltip behaves like a simple control property.

Controls need to explicitly support this kind of tooltip as they have to render it, but most controls do. Exceptions will be documented for the corresponding controls (e.g. sap.ui.core.HTML does not support tooltips).

Alternatively, tooltip can act like a 0..1 aggregation and can be set to a tooltip control (an instance of a subclass of sap.ui.core.TooltipBase). In that case, the framework will take care of rendering the tooltip control in a popup-like manner. Such a tooltip control can display arbitrary content, not only a string.

UI5 currently does not provide a recommended implementation of TooltipBase as the use of content-rich tooltips is discouraged by the Fiori Design Guidelines. Existing subclasses of TooltipBase therefore have been deprecated. However, apps can still subclass from TooltipBase and create their own implementation when needed (potentially taking the deprecated implementations as a starting point).

See the section Using Tooltips in the Fiori Design Guideline.


Methods Overview

Method Description
compareByType

Compares the given message with this message. The types of sap.ui.core.MessageType are ordered from "Error" > "Warning" > "Success" > "Information" > "None".

See sap.ui.core.Message.compareByType

sap.ui.core.Message.compareByType

Compares two given messages with each other.

The types of sap.ui.core.MessageType are ordered from "Error" > "Warning" > "Success" > "Information" > "None".

sap.ui.core.Message.extend

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

getDefaultIcon

Returns the icon's default URI depending on given size.

getIcon

Gets current value of property icon.

A possible icon URI of the message

getLevel

Gets current value of property level.

Setting the message's level.

Default value is None.

sap.ui.core.Message.getMetadata

Returns a metadata object for class sap.ui.core.Message.

getReadOnly

Gets current value of property readOnly.

Determines whether the message should be read only. This helps the application to handle a message a different way if the application differentiates between read-only and common messages.

Default value is false.

getText

Gets current value of property text.

Message text

getTimestamp

Gets current value of property timestamp.

Message's timestamp. It is just a simple String that will be used without any transformation. So the application that uses messages needs to format the timestamp to its own needs.

setIcon

Sets a new value for property icon.

A possible icon URI of the message

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

setLevel

Sets a new value for property level.

Setting the message's level.

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

Default value is None.

setReadOnly

Sets a new value for property readOnly.

Determines whether the message should be read only. This helps the application to handle a message a different way if the application differentiates between read-only and common messages.

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

Default value is false.

setText

Sets a new value for property text.

Message text

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

setTimestamp

Sets a new value for property timestamp.

Message's timestamp. It is just a simple String that will be used without any transformation. So the application that uses messages needs to format the timestamp to its own needs.

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

compareByType

Compares the given message with this message. The types of sap.ui.core.MessageType are ordered from "Error" > "Warning" > "Success" > "Information" > "None".

See sap.ui.core.Message.compareByType

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

message to compare with this one

sap.ui.core.Message.compareByType

Compares two given messages with each other.

The types of sap.ui.core.MessageType are ordered from "Error" > "Warning" > "Success" > "Information" > "None".

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

first message to compare

oMessage2 sap.ui.core.Message

second message to compare

sap.ui.core.Message.extend

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

getDefaultIcon

Returns the icon's default URI depending on given size.

Param Type DefaultValue Description
sSize string "16x16"

Only the values "16x16" or "32x32" are allowed. Otherwise the default value is used.

getIcon

Gets current value of property icon.

A possible icon URI of the message

getLevel

Gets current value of property level.

Setting the message's level.

Default value is None.

sap.ui.core.Message.getMetadata

Returns a metadata object for class sap.ui.core.Message.

getReadOnly

Gets current value of property readOnly.

Determines whether the message should be read only. This helps the application to handle a message a different way if the application differentiates between read-only and common messages.

Default value is false.

getText

Gets current value of property text.

Message text

getTimestamp

Gets current value of property timestamp.

Message's timestamp. It is just a simple String that will be used without any transformation. So the application that uses messages needs to format the timestamp to its own needs.

setIcon

Sets a new value for property icon.

A possible icon URI of the message

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

setLevel

Sets a new value for property level.

Setting the message's level.

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

Default value is None.

Param Type DefaultValue Description
sLevel sap.ui.core.MessageType None

New value for property level

setReadOnly

Sets a new value for property readOnly.

Determines whether the message should be read only. This helps the application to handle a message a different way if the application differentiates between read-only and common messages.

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

New value for property readOnly

setText

Sets a new value for property text.

Message 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

setTimestamp

Sets a new value for property timestamp.

Message's timestamp. It is just a simple String that will be used without any transformation. So the application that uses messages needs to format the timestamp to its own needs.

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

Param Type DefaultValue Description
sTimestamp string

New value for property timestamp