A wrapper control used to hold different types of system messages.
The message item holds the basic set of properties for a system message:
markupDescription
needs to be set to true, to ensure it is interpreted correctly. longtextUrl
property. link
aggregation. Note: The MessageItem control replaces sap.m.MessagePopoverItem as a more generic wrapper for messages.
Constructor for a new MessageItem.
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.MessageItem(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 |
Name | Type | Default Value | Description |
---|---|---|---|
activeTitle | boolean | false | Defines whether the title of the item will be interactive. |
counter | int | Defines the number of messages for a given message. Visibility: public |
|
description | string | empty string | Specifies detailed description of the message Visibility: public |
groupName | string | empty string | Name of a message group the current item belongs to. Visibility: public |
longtextUrl | sap.ui.core.URI | Specifies long text description location URL Visibility: public |
|
markupDescription | boolean | false | Specifies if description should be interpreted as markup Visibility: public |
subtitle | string | Specifies the subtitle of the message Note: This is only visible when the |
|
title | string | empty string | Specifies the title of the message Visibility: public |
type | sap.ui.core.MessageType | Error | Specifies the type of the message Visibility: public |
Default Aggregation: link
Name | Cardinality | Type | Description |
---|---|---|---|
link (default) | 0..1 | sap.m.Link |
Adds an sap.m.Link control which will be displayed at the end of the description of a message. |
Method | Description |
---|---|
destroyLink |
Destroys the link in the aggregation link. |
sap.m.MessageItem.extend |
Creates a new subclass of class sap.m.MessageItem with name
|
getActiveTitle |
Gets current value of property activeTitle. Defines whether the title of the item will be interactive. Default value is |
getCounter |
Gets current value of property counter. Defines the number of messages for a given message. |
getDescription |
Gets current value of property description. Specifies detailed description of the message Default value is |
getGroupName |
Gets current value of property groupName. Name of a message group the current item belongs to. Default value is |
getLink |
Gets content of aggregation link. Adds an sap.m.Link control which will be displayed at the end of the description of a message. |
getLongtextUrl |
Gets current value of property longtextUrl. Specifies long text description location URL |
getMarkupDescription |
Gets current value of property markupDescription. Specifies if description should be interpreted as markup Default value is |
sap.m.MessageItem.getMetadata |
Returns a metadata object for class sap.m.MessageItem. |
getSubtitle |
Gets current value of property subtitle. Specifies the subtitle of the message Note: This is only visible when the |
getTitle |
Gets current value of property title. Specifies the title of the message Default value is |
getType |
Gets current value of property type. Specifies the type of the message Default value is |
setActiveTitle |
Sets a new value for property activeTitle. Defines whether the title of the item will be interactive. When called with a value of Default value is |
setCounter |
Sets a new value for property counter. Defines the number of messages for a given message. When called with a value of |
setDescription |
Sets a new value for property description. Specifies detailed description of the message When called with a value of Default value is |
setGroupName |
Sets a new value for property groupName. Name of a message group the current item belongs to. When called with a value of Default value is |
setLink |
Sets the aggregated link. |
setLongtextUrl |
Sets a new value for property longtextUrl. Specifies long text description location URL When called with a value of |
setMarkupDescription |
Sets a new value for property markupDescription. Specifies if description should be interpreted as markup When called with a value of Default value is |
setSubtitle |
Sets a new value for property subtitle. Specifies the subtitle of the message Note: This is only visible when the When called with a value of |
setTitle |
Sets a new value for property title. Specifies the title of the message When called with a value of Default value is |
setType |
Sets type of the MessageItem. Note: if you set the type to None it will be handled and rendered as Information. |
Creates a new subclass of class sap.m.MessageItem 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.Item.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 |
Gets current value of property activeTitle.
Defines whether the title of the item will be interactive.
Default value is false
.
Gets current value of property counter.
Defines the number of messages for a given message.
Gets current value of property description.
Specifies detailed description of the message
Default value is empty string
.
Gets current value of property groupName.
Name of a message group the current item belongs to.
Default value is empty string
.
Gets content of aggregation link.
Adds an sap.m.Link control which will be displayed at the end of the description of a message.
Gets current value of property longtextUrl.
Specifies long text description location URL
Gets current value of property markupDescription.
Specifies if description should be interpreted as markup
Default value is false
.
Gets current value of property subtitle.
Specifies the subtitle of the message Note: This is only visible when the title
property is not empty.
Gets current value of property title.
Specifies the title of the message
Default value is empty string
.
Gets current value of property type.
Specifies the type of the message
Default value is Error
.
Sets a new value for property activeTitle.
Defines whether the title of the item will be interactive.
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 |
---|---|---|---|
bActiveTitle | boolean | false |
New value for property |
Sets a new value for property counter.
Defines the number of messages for a given message.
When called with a value of null
or undefined
, the default value of the property will be restored.
Param | Type | DefaultValue | Description |
---|---|---|---|
iCounter | int |
New value for property |
Sets a new value for property description.
Specifies detailed description of the message
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is empty string
.
Param | Type | DefaultValue | Description |
---|---|---|---|
sDescription | string | "" |
New value for property |
Sets a new value for property groupName.
Name of a message group the current item belongs to.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is empty string
.
Param | Type | DefaultValue | Description |
---|---|---|---|
sGroupName | string | "" |
New value for property |
Sets the aggregated link.
Param | Type | DefaultValue | Description |
---|---|---|---|
oLink | sap.m.Link |
The link to set |
Sets a new value for property longtextUrl.
Specifies long text description location URL
When called with a value of null
or undefined
, the default value of the property will be restored.
Param | Type | DefaultValue | Description |
---|---|---|---|
sLongtextUrl | sap.ui.core.URI |
New value for property |
Sets a new value for property markupDescription.
Specifies if description should be interpreted as markup
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 |
---|---|---|---|
bMarkupDescription | boolean | false |
New value for property |
Sets a new value for property subtitle.
Specifies the subtitle of the message Note: This is only visible when the title
property is not empty.
When called with a value of null
or undefined
, the default value of the property will be restored.
Param | Type | DefaultValue | Description |
---|---|---|---|
sSubtitle | string |
New value for property |
Sets a new value for property title.
Specifies the title of the message
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is empty string
.
Param | Type | DefaultValue | Description |
---|---|---|---|
sTitle | string | "" |
New value for property |
Sets type of the MessageItem. Note: if you set the type to None it will be handled and rendered as Information.
Param | Type | DefaultValue | Description |
---|---|---|---|
sType | sap.ui.core.MessageType |
Type of Message |