class sap.m.MessageItem

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

A wrapper control used to hold different types of system messages.

Structure

The message item holds the basic set of properties for a system message:


Constructor

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


Properties

Name Type Default Value Description
activeTitle boolean false

Defines whether the title of the item will be interactive.

Since: 1.58.

Visibility: public
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 property is not empty.

Visibility: public
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

Aggregations

Default Aggregation: link

Name Cardinality Type Description

Methods Overview

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 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.

getActiveTitle

Gets current value of property activeTitle.

Defines whether the title of the item will be interactive.

Default value is false.

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 empty string.

getGroupName

Gets current value of property groupName.

Name of a message group the current item belongs to.

Default value is empty string.

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 false.

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 title property is not empty.

getTitle

Gets current value of property title.

Specifies the title of the message

Default value is empty string.

getType

Gets current value of property type.

Specifies the type of the message

Default value is Error.

setActiveTitle

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.

setCounter

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.

setDescription

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.

setGroupName

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.

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 null or undefined, the default value of the property will be restored.

setMarkupDescription

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.

setSubtitle

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.

setTitle

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.

setType

Sets type of the MessageItem. Note: if you set the type to None it will be handled and rendered as Information.

sap.m.MessageItem.extend

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

getActiveTitle

Gets current value of property activeTitle.

Defines whether the title of the item will be interactive.

Default value is false.

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 empty string.

getGroupName

Gets current value of property groupName.

Name of a message group the current item belongs to.

Default value is empty string.

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 false.

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 title property is not empty.

getTitle

Gets current value of property title.

Specifies the title of the message

Default value is empty string.

getType

Gets current value of property type.

Specifies the type of the message

Default value is Error.

setActiveTitle

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 activeTitle

setCounter

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 counter

setDescription

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 description

setGroupName

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 groupName

setLongtextUrl

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 longtextUrl

setMarkupDescription

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 markupDescription

setSubtitle

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 subtitle

setTitle

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 title

setType

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