class sap.m.MessagePopover

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

A MessagePopover is used to display a summarized list of different types of messages (error, warning, success, and information messages).

Overview

It provides a handy and systematized way to navigate and explore details for every message. It is adaptive and responsive. It renders as a dialog with a Close button in the header on phones, and as a popover on tablets and higher resolution devices. It also exposes an event sap.m.MessagePopover#event:activeTitlePress, which can be used for navigation from a message to the source of the issue.

Notes:

Structure

The MessagePopover stores all messages in an aggregation of type sap.m.MessageItem named items.

A set of properties determines how the items are rendered:

Usage

When to use:

Responsive Behavior

On mobile phones, the MessagePopover is automatically shown in full screen mode.
On desktop and tablet, the message popover opens in a popover.
On desktop the opened popover is resizable, if it is placed in a sap.m.Toolbar, sap.m.Bar, or used in sap.m.semantic.SemanticPage.


Constructor

Constructor for a new MessagePopover.

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.MessagePopover(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
asyncDescriptionHandler any

Callback function for resolving a promise after description has been asynchronously loaded inside this function. You can use this function in order to validate the description before displaying it.

Visibility: public
asyncURLHandler any

Callback function for resolving a promise after a link has been asynchronously validated inside this function. You can use this function in order to validate URLs before displaying them inside the description.

Visibility: public
groupItems boolean false

Defines whether the MessageItems are grouped or not.

Visibility: public
initiallyExpanded boolean true

Sets the initial state of the control - expanded or collapsed. By default the control opens as expanded. Note: If there is only one message in the control, this state will be ignored and the details page of the message will be shown.

Visibility: public
placement sap.m.VerticalPlacementType Vertical

Determines the position, where the control will appear on the screen. The default value is sap.m.VerticalPlacementType.Vertical. Setting this property while the control is open, will not cause any re-rendering and changing of the position. Changes will only be applied with the next interaction.

Visibility: public

Aggregations

Default Aggregation: items

Name Cardinality Type Description
headerButton 0..1 sap.m.Button

Sets a custom header button.

items (default) 0..n sap.m.MessageItem

A list with message items.


Events Overview

Event Description
activeTitlePress

Event fired when an active title of a MessageItem is clicked.

Since: 1.58.

afterClose

Event fired after the popover is closed.

afterOpen

Event fired after the popover is opened.

beforeClose

Event fired before the popover is closed.

beforeOpen

Event fired before the popover is opened.

itemSelect

Event fired when description is shown.

listSelect

Event fired when one of the lists is shown when (not) filtered by type.

longtextLoaded

Event fired when the long text description data from a remote URL is loaded.

urlValidated

Event fired when a validation of a URL from long text description is ready.

activeTitlePress

Event fired when an active title of a MessageItem is clicked.

Since: 1.58.

Param Type Description
oControlEvent sap.ui.base.Event
getSource sap.ui.base.EventProvider
getParameters object
item sap.m.MessageItem

Refers to the message item that contains the activeTitle.

afterClose

Event fired after the popover is closed.

Param Type Description
oControlEvent sap.ui.base.Event
getSource sap.ui.base.EventProvider
getParameters object
openBy sap.ui.core.Control

Refers to the control that opens the popover.

afterOpen

Event fired after the popover is opened.

Param Type Description
oControlEvent sap.ui.base.Event
getSource sap.ui.base.EventProvider
getParameters object
openBy sap.ui.core.Control

Refers to the control that opens the popover.

beforeClose

Event fired before the popover is closed.

Param Type Description
oControlEvent sap.ui.base.Event
getSource sap.ui.base.EventProvider
getParameters object
openBy sap.ui.core.Control

Refers to the control that opens the popover. See sap.ui.core.MessageType enum values for types.

beforeOpen

Event fired before the popover is opened.

Param Type Description
oControlEvent sap.ui.base.Event
getSource sap.ui.base.EventProvider
getParameters object
openBy sap.ui.core.Control

Refers to the control that opens the popover.

itemSelect

Event fired when description is shown.

Param Type Description
oControlEvent sap.ui.base.Event
getSource sap.ui.base.EventProvider
getParameters object
item sap.m.MessagePopoverItem

Refers to the MessagePopover item that is being presented.

messageTypeFilter sap.ui.core.MessageType

Refers to the type of messages being shown.

listSelect

Event fired when one of the lists is shown when (not) filtered by type.

Param Type Description
oControlEvent sap.ui.base.Event
getSource sap.ui.base.EventProvider
getParameters object
messageTypeFilter sap.ui.core.MessageType

This parameter refers to the type of messages being shown.

longtextLoaded

Event fired when the long text description data from a remote URL is loaded.

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

urlValidated

Event fired when a validation of a URL from long text description is ready.

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

Methods Overview

Method Description
addItem

Adds some item to the aggregation items.

attachActiveTitlePress

Attaches event handler fnFunction to the activeTitlePress event of this sap.m.MessagePopover.

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

Event fired when an active title of a MessageItem is clicked.

attachAfterClose

Attaches event handler fnFunction to the afterClose event of this sap.m.MessagePopover.

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

Event fired after the popover is closed.

attachAfterOpen

Attaches event handler fnFunction to the afterOpen event of this sap.m.MessagePopover.

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

Event fired after the popover is opened.

attachBeforeClose

Attaches event handler fnFunction to the beforeClose event of this sap.m.MessagePopover.

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

Event fired before the popover is closed.

attachBeforeOpen

Attaches event handler fnFunction to the beforeOpen event of this sap.m.MessagePopover.

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

Event fired before the popover is opened.

attachItemSelect

Attaches event handler fnFunction to the itemSelect event of this sap.m.MessagePopover.

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

Event fired when description is shown.

attachListSelect

Attaches event handler fnFunction to the listSelect event of this sap.m.MessagePopover.

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

Event fired when one of the lists is shown when (not) filtered by type.

attachLongtextLoaded

Attaches event handler fnFunction to the longtextLoaded event of this sap.m.MessagePopover.

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

Event fired when the long text description data from a remote URL is loaded.

attachUrlValidated

Attaches event handler fnFunction to the urlValidated event of this sap.m.MessagePopover.

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

Event fired when a validation of a URL from long text description is ready.

close

Closes the MessagePopover

destroyHeaderButton

Destroys the headerButton in the aggregation headerButton.

destroyItems

Destroys all the items in the aggregation items.

detachActiveTitlePress

Detaches event handler fnFunction from the activeTitlePress event of this sap.m.MessagePopover.

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

detachAfterClose

Detaches event handler fnFunction from the afterClose event of this sap.m.MessagePopover.

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

detachAfterOpen

Detaches event handler fnFunction from the afterOpen event of this sap.m.MessagePopover.

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

detachBeforeClose

Detaches event handler fnFunction from the beforeClose event of this sap.m.MessagePopover.

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

detachBeforeOpen

Detaches event handler fnFunction from the beforeOpen event of this sap.m.MessagePopover.

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

detachItemSelect

Detaches event handler fnFunction from the itemSelect event of this sap.m.MessagePopover.

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

detachListSelect

Detaches event handler fnFunction from the listSelect event of this sap.m.MessagePopover.

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

detachLongtextLoaded

Detaches event handler fnFunction from the longtextLoaded event of this sap.m.MessagePopover.

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

detachUrlValidated

Detaches event handler fnFunction from the urlValidated event of this sap.m.MessagePopover.

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

sap.m.MessagePopover.extend

Creates a new subclass of class sap.m.MessagePopover 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.Control.extend.

fireActiveTitlePress

Fires event activeTitlePress to attached listeners.

fireAfterClose

Fires event afterClose to attached listeners.

fireAfterOpen

Fires event afterOpen to attached listeners.

fireBeforeClose

Fires event beforeClose to attached listeners.

fireBeforeOpen

Fires event beforeOpen to attached listeners.

fireItemSelect

Fires event itemSelect to attached listeners.

fireListSelect

Fires event listSelect to attached listeners.

fireLongtextLoaded

Fires event longtextLoaded to attached listeners.

fireUrlValidated

Fires event urlValidated to attached listeners.

getAsyncDescriptionHandler

Gets current value of property asyncDescriptionHandler.

Callback function for resolving a promise after description has been asynchronously loaded inside this function. You can use this function in order to validate the description before displaying it.

getAsyncURLHandler

Gets current value of property asyncURLHandler.

Callback function for resolving a promise after a link has been asynchronously validated inside this function. You can use this function in order to validate URLs before displaying them inside the description.

getGroupItems

Gets current value of property groupItems.

Defines whether the MessageItems are grouped or not.

Default value is false.

getHeaderButton

Gets content of aggregation headerButton.

Sets a custom header button.

getInitiallyExpanded

Gets current value of property initiallyExpanded.

Sets the initial state of the control - expanded or collapsed. By default the control opens as expanded. Note: If there is only one message in the control, this state will be ignored and the details page of the message will be shown.

Default value is true.

getItems

Gets content of aggregation items.

A list with message items.

sap.m.MessagePopover.getMetadata

Returns a metadata object for class sap.m.MessagePopover.

getPlacement

Gets current value of property placement.

Determines the position, where the control will appear on the screen. The default value is sap.m.VerticalPlacementType.Vertical. Setting this property while the control is open, will not cause any re-rendering and changing of the position. Changes will only be applied with the next interaction.

Default value is "Vertical".

indexOfItem

Checks for the provided sap.m.MessageItem in the aggregation items. and returns its index if found or -1 otherwise.

insertItem

Inserts a item into the aggregation items.

isOpen

The method checks if the MessagePopover is open. It returns true when the MessagePopover is currently open (this includes opening and closing animations), otherwise it returns false

navigateBack

Navigates back to the list page.

openBy

Opens the MessagePopover

removeAllItems

Removes all the controls from the aggregation items.

Additionally, it unregisters them from the hosting UIArea.

removeItem

Removes a item from the aggregation items.

setAsyncDescriptionHandler

Sets a new value for property asyncDescriptionHandler.

Callback function for resolving a promise after description has been asynchronously loaded inside this function. You can use this function in order to validate the description before displaying it.

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

setAsyncURLHandler

Sets a new value for property asyncURLHandler.

Callback function for resolving a promise after a link has been asynchronously validated inside this function. You can use this function in order to validate URLs before displaying them inside the description.

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

sap.m.MessagePopover.setDefaultHandlers

Setter for default description and URL validation callbacks across all instances of MessagePopover

setGroupItems

Sets a new value for property groupItems.

Defines whether the MessageItems are grouped or not.

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

Default value is false.

setHeaderButton

Sets the aggregated headerButton.

setInitiallyExpanded

Sets a new value for property initiallyExpanded.

Sets the initial state of the control - expanded or collapsed. By default the control opens as expanded. Note: If there is only one message in the control, this state will be ignored and the details page of the message will be shown.

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

Default value is true.

setPlacement

Sets a new value for property placement.

Determines the position, where the control will appear on the screen. The default value is sap.m.VerticalPlacementType.Vertical. Setting this property while the control is open, will not cause any re-rendering and changing of the position. Changes will only be applied with the next interaction.

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

Default value is "Vertical".

toggle

This method toggles between open and closed state of the MessagePopover instance. oControl parameter is mandatory in the same way as in 'openBy' method

addItem

Adds some item to the aggregation items.

Param Type DefaultValue Description
vItem sap.m.MessageItem sap.m.MessagePopoverItem

The item to add; if empty, nothing is inserted

attachActiveTitlePress

Attaches event handler fnFunction to the activeTitlePress event of this sap.m.MessagePopover.

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

Event fired when an active title of a MessageItem is clicked.

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.m.MessagePopover itself

attachAfterClose

Attaches event handler fnFunction to the afterClose event of this sap.m.MessagePopover.

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

Event fired after the popover is closed.

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.m.MessagePopover itself

attachAfterOpen

Attaches event handler fnFunction to the afterOpen event of this sap.m.MessagePopover.

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

Event fired after the popover is opened.

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.m.MessagePopover itself

attachBeforeClose

Attaches event handler fnFunction to the beforeClose event of this sap.m.MessagePopover.

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

Event fired before the popover is closed.

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.m.MessagePopover itself

attachBeforeOpen

Attaches event handler fnFunction to the beforeOpen event of this sap.m.MessagePopover.

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

Event fired before the popover is opened.

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.m.MessagePopover itself

attachItemSelect

Attaches event handler fnFunction to the itemSelect event of this sap.m.MessagePopover.

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

Event fired when description is shown.

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.m.MessagePopover itself

attachListSelect

Attaches event handler fnFunction to the listSelect event of this sap.m.MessagePopover.

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

Event fired when one of the lists is shown when (not) filtered by type.

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.m.MessagePopover itself

attachLongtextLoaded

Attaches event handler fnFunction to the longtextLoaded event of this sap.m.MessagePopover.

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

Event fired when the long text description data from a remote URL is loaded.

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.m.MessagePopover itself

attachUrlValidated

Attaches event handler fnFunction to the urlValidated event of this sap.m.MessagePopover.

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

Event fired when a validation of a URL from long text description is ready.

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.m.MessagePopover itself

close

Closes the MessagePopover

destroyHeaderButton

Destroys the headerButton in the aggregation headerButton.

destroyItems

Destroys all the items in the aggregation items.

detachActiveTitlePress

Detaches event handler fnFunction from the activeTitlePress event of this sap.m.MessagePopover.

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

detachAfterClose

Detaches event handler fnFunction from the afterClose event of this sap.m.MessagePopover.

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

detachAfterOpen

Detaches event handler fnFunction from the afterOpen event of this sap.m.MessagePopover.

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

detachBeforeClose

Detaches event handler fnFunction from the beforeClose event of this sap.m.MessagePopover.

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

detachBeforeOpen

Detaches event handler fnFunction from the beforeOpen event of this sap.m.MessagePopover.

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

detachItemSelect

Detaches event handler fnFunction from the itemSelect event of this sap.m.MessagePopover.

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

detachListSelect

Detaches event handler fnFunction from the listSelect event of this sap.m.MessagePopover.

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

detachLongtextLoaded

Detaches event handler fnFunction from the longtextLoaded event of this sap.m.MessagePopover.

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

detachUrlValidated

Detaches event handler fnFunction from the urlValidated event of this sap.m.MessagePopover.

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.m.MessagePopover.extend

Creates a new subclass of class sap.m.MessagePopover 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.Control.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

fireActiveTitlePress

Fires event activeTitlePress to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

item sap.m.MessageItem

Refers to the message item that contains the activeTitle.

fireAfterClose

Fires event afterClose to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

openBy sap.ui.core.Control

Refers to the control that opens the popover.

fireAfterOpen

Fires event afterOpen to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

openBy sap.ui.core.Control

Refers to the control that opens the popover.

fireBeforeClose

Fires event beforeClose to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

openBy sap.ui.core.Control

Refers to the control that opens the popover. See sap.ui.core.MessageType enum values for types.

fireBeforeOpen

Fires event beforeOpen to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

openBy sap.ui.core.Control

Refers to the control that opens the popover.

fireItemSelect

Fires event itemSelect to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

item sap.m.MessagePopoverItem

Refers to the MessagePopover item that is being presented.

messageTypeFilter sap.ui.core.MessageType

Refers to the type of messages being shown.

fireListSelect

Fires event listSelect to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

messageTypeFilter sap.ui.core.MessageType

This parameter refers to the type of messages being shown.

fireLongtextLoaded

Fires event longtextLoaded to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

fireUrlValidated

Fires event urlValidated to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

getAsyncDescriptionHandler

Gets current value of property asyncDescriptionHandler.

Callback function for resolving a promise after description has been asynchronously loaded inside this function. You can use this function in order to validate the description before displaying it.

getAsyncURLHandler

Gets current value of property asyncURLHandler.

Callback function for resolving a promise after a link has been asynchronously validated inside this function. You can use this function in order to validate URLs before displaying them inside the description.

getGroupItems

Gets current value of property groupItems.

Defines whether the MessageItems are grouped or not.

Default value is false.

getHeaderButton

Gets content of aggregation headerButton.

Sets a custom header button.

getInitiallyExpanded

Gets current value of property initiallyExpanded.

Sets the initial state of the control - expanded or collapsed. By default the control opens as expanded. Note: If there is only one message in the control, this state will be ignored and the details page of the message will be shown.

Default value is true.

getItems

Gets content of aggregation items.

A list with message items.

sap.m.MessagePopover.getMetadata

Returns a metadata object for class sap.m.MessagePopover.

getPlacement

Gets current value of property placement.

Determines the position, where the control will appear on the screen. The default value is sap.m.VerticalPlacementType.Vertical. Setting this property while the control is open, will not cause any re-rendering and changing of the position. Changes will only be applied with the next interaction.

Default value is "Vertical".

indexOfItem

Checks for the provided sap.m.MessageItem in the aggregation items. and returns its index if found or -1 otherwise.

Param Type DefaultValue Description
vItem sap.m.MessageItem sap.m.MessagePopoverItem

The item whose index is looked for

insertItem

Inserts a item into the aggregation items.

Param Type DefaultValue Description
vItem sap.m.MessageItem sap.m.MessagePopoverItem

The item to insert; if empty, nothing is inserted

iIndex int

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

isOpen

The method checks if the MessagePopover is open. It returns true when the MessagePopover is currently open (this includes opening and closing animations), otherwise it returns false

navigateBack

Navigates back to the list page.

openBy

Opens the MessagePopover

Param Type DefaultValue Description
oControl sap.ui.core.Control

Control which opens the MessagePopover

removeAllItems

Removes all the controls from the aggregation items.

Additionally, it unregisters them from the hosting UIArea.

removeItem

Removes a item from the aggregation items.

Param Type DefaultValue Description
vItem int string sap.m.MessageItem sap.m.MessagePopoverItem

The item to remove or its index or id

setAsyncDescriptionHandler

Sets a new value for property asyncDescriptionHandler.

Callback function for resolving a promise after description has been asynchronously loaded inside this function. You can use this function in order to validate the description before displaying it.

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

Param Type DefaultValue Description
oAsyncDescriptionHandler any

New value for property asyncDescriptionHandler

setAsyncURLHandler

Sets a new value for property asyncURLHandler.

Callback function for resolving a promise after a link has been asynchronously validated inside this function. You can use this function in order to validate URLs before displaying them inside the description.

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

Param Type DefaultValue Description
oAsyncURLHandler any

New value for property asyncURLHandler

sap.m.MessagePopover.setDefaultHandlers

Setter for default description and URL validation callbacks across all instances of MessagePopover

Param Type DefaultValue Description
mDefaultHandlers object

An object setting default callbacks

asyncDescriptionHandler function

The description handler

asyncURLHandler function

The URL handler

setGroupItems

Sets a new value for property groupItems.

Defines whether the MessageItems are grouped or not.

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

New value for property groupItems

setHeaderButton

Sets the aggregated headerButton.

Param Type DefaultValue Description
oHeaderButton sap.m.Button

The headerButton to set

setInitiallyExpanded

Sets a new value for property initiallyExpanded.

Sets the initial state of the control - expanded or collapsed. By default the control opens as expanded. Note: If there is only one message in the control, this state will be ignored and the details page of the message will be shown.

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

Default value is true.

Param Type DefaultValue Description
bInitiallyExpanded boolean true

New value for property initiallyExpanded

setPlacement

Sets a new value for property placement.

Determines the position, where the control will appear on the screen. The default value is sap.m.VerticalPlacementType.Vertical. Setting this property while the control is open, will not cause any re-rendering and changing of the position. Changes will only be applied with the next interaction.

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

Default value is "Vertical".

Param Type DefaultValue Description
sPlacement sap.m.VerticalPlacementType "Vertical"

New value for property placement

toggle

This method toggles between open and closed state of the MessagePopover instance. oControl parameter is mandatory in the same way as in 'openBy' method

Param Type DefaultValue Description
oControl sap.ui.core.Control

Control which opens the MessagePopover