Class sap.m.MessagePageModule: sap/m/MessagePage

extends Control

MessagePage is displayed when there is no data or matching content. There are different use cases where a MessagePage might be visualized, for example: - The search query returned no results - The app contains no items - There are too many items - The application is loading The layout is unchanged but the text varies depending on the use case.
Note: The MessagePage is not intended to be used as a top-level control, but rather used within controls such as NavContainer, App, Shell or other container controls.
Since: 1.28.
Constructor Summary
new sap.m.MessagePage(sId?, mSettings?)Constructor for a new MessagePage.
Event Summary
navButtonPress(oControlEvent)This event is fired when Nav Button is pressed.
Events borrowed from class sap.ui.core.Control
Method Summary
sap.m.MessagePage.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.m.MessagePage with name sClassName and enriches it with the information contained in oClassInfo.
sap.m.MessagePage.getMetadata()Returns a metadata object for class sap.m.MessagePage.
addAriaDescribedBy(vAriaDescribedBy)Adds some ariaDescribedBy into the association ariaDescribedBy.
addAriaLabelledBy(vAriaLabelledBy)Adds some ariaLabelledBy into the association ariaLabelledBy.
attachNavButtonPress(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the navButtonPress event of this sap.m.MessagePage.
destroyCustomDescription()Destroys the customDescription in the aggregation customDescription.
destroyCustomText()Destroys the customText in the aggregation customText.
detachNavButtonPress(fnFunction, oListener)Detaches event handler fnFunction from the navButtonPress event of this sap.m.MessagePage.
fireNavButtonPress(mParameters?)Fires event navButtonPress to attached listeners.
getAriaDescribedBy()Returns array of IDs of the elements which are the current targets of the association ariaDescribedBy.
getAriaLabelledBy()Returns array of IDs of the elements which are the current targets of the association ariaLabelledBy.
getCustomDescription()Gets content of aggregation customDescription.
getCustomText()Gets content of aggregation customText.
getDescription()Gets current value of property description.
getIcon()Gets current value of property icon.
getShowHeader()Gets current value of property showHeader.
getShowNavButton()Gets current value of property showNavButton.
getText()Gets current value of property text.
getTextDirection()Gets current value of property textDirection.
getTitle()Gets current value of property title.
removeAllAriaDescribedBy()Removes all the controls in the association named ariaDescribedBy.
removeAllAriaLabelledBy()Removes all the controls in the association named ariaLabelledBy.
removeAriaDescribedBy(vAriaDescribedBy)Removes an ariaDescribedBy from the association named ariaDescribedBy.
removeAriaLabelledBy(vAriaLabelledBy)Removes an ariaLabelledBy from the association named ariaLabelledBy.
setCustomDescription(oCustomDescription)Sets the aggregated customDescription.
setCustomText(oCustomText)Sets the aggregated customText.
setDescription(sDescription)Sets a new value for property description.
setIcon(sIcon)Sets a new value for property icon.
setShowHeader(bShowHeader)Sets a new value for property showHeader.
setShowNavButton(bShowNavButton)Sets a new value for property showNavButton.
setText(sText)Sets a new value for property text.
setTextDirection(sTextDirection)Sets a new value for property textDirection.
setTitle(sTitle)Sets a new value for property title.
Constructor Detail
new sap.m.MessagePage(sId?, mSettings?)

Constructor for a new MessagePage.

Accepts an object literal mSettings that defines initial property values, aggregated and associated objects as well as event handlers. See sap.ui.base.ManagedObject for a general description of the syntax of the settings object.

The supported settings are:

In addition, all settings applicable to the base type sap.ui.core.Control can be used as well.

Parameters:
stringsId?id for the new control, generated automatically if no id is given
objectmSettings?initial settings for the new control
Event Detail
navButtonPress(oControlEvent)
This event is fired when Nav Button is pressed.
Parameters:
sap.ui.base.EventoControlEvent
sap.ui.base.EventProvideroControlEvent.getSource
objectoControlEvent.getParameters
Since:
1.28.1
Method Detail
sap.m.MessagePage.extend(sClassName, oClassInfo?, FNMetaImpl?): function

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

Parameters:
stringsClassNameName of the class being created
objectoClassInfo?Object literal with information about the class
functionFNMetaImpl?Constructor function for the metadata object; if not given, it defaults to sap.ui.core.ElementMetadata
Returns:
functionCreated class / constructor function
sap.m.MessagePage.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.m.MessagePage.
Returns:
sap.ui.base.MetadataMetadata object describing this class
addAriaDescribedBy(vAriaDescribedBy): sap.m.MessagePage
Adds some ariaDescribedBy into the association ariaDescribedBy.
Parameters:
sap.ui.core.ID|sap.ui.core.ControlvAriaDescribedBythe ariaDescribedBy to add; if empty, nothing is inserted
Returns:
sap.m.MessagePageReference to this in order to allow method chaining
addAriaLabelledBy(vAriaLabelledBy): sap.m.MessagePage
Adds some ariaLabelledBy into the association ariaLabelledBy.
Parameters:
sap.ui.core.ID|sap.ui.core.ControlvAriaLabelledBythe ariaLabelledBy to add; if empty, nothing is inserted
Returns:
sap.m.MessagePageReference to this in order to allow method chaining
attachNavButtonPress(oData?, fnFunction, oListener?): sap.m.MessagePage

Attaches event handler fnFunction to the navButtonPress event of this sap.m.MessagePage.

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

This event is fired when Nav Button is pressed.

Parameters:
objectoData?An application-specific payload object that will be passed to the event handler along with the event object when firing the event
functionfnFunctionThe function to be called when the event occurs
objectoListener?Context object to call the event handler with. Defaults to this sap.m.MessagePage itself
Returns:
sap.m.MessagePageReference to this in order to allow method chaining
Since:
1.28.1
destroyCustomDescription(): sap.m.MessagePage
Destroys the customDescription in the aggregation customDescription.
Returns:
sap.m.MessagePageReference to this in order to allow method chaining
destroyCustomText(): sap.m.MessagePage
Destroys the customText in the aggregation customText.
Returns:
sap.m.MessagePageReference to this in order to allow method chaining
detachNavButtonPress(fnFunction, oListener): sap.m.MessagePage

Detaches event handler fnFunction from the navButtonPress event of this sap.m.MessagePage.

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

Parameters:
functionfnFunctionThe function to be called, when the event occurs
objectoListenerContext object on which the given function had to be called
Returns:
sap.m.MessagePageReference to this in order to allow method chaining
Since:
1.28.1
fireNavButtonPress(mParameters?): sap.m.MessagePage
Fires event navButtonPress to attached listeners.
Parameters:
objectmParameters?Parameters to pass along with the event
Returns:
sap.m.MessagePageReference to this in order to allow method chaining
Since:
1.28.1
getAriaDescribedBy(): sap.ui.core.ID[]
Returns array of IDs of the elements which are the current targets of the association ariaDescribedBy.
Returns:
sap.ui.core.ID[]
getAriaLabelledBy(): sap.ui.core.ID[]
Returns array of IDs of the elements which are the current targets of the association ariaLabelledBy.
Returns:
sap.ui.core.ID[]
getCustomDescription(): sap.m.Link

Gets content of aggregation customDescription.

The (optional) custom description control of this page. Use this aggregation when the "description" (sap.m.Text) control needs to be replaced with an sap.m.Link control. "description" and "textDirection" setters can be used for this aggregation.

Returns:
sap.m.Link
getCustomText(): sap.m.Link

Gets content of aggregation customText.

The (optional) custom Text control of this page. Use this aggregation when the "text" (sap.m.Text) control needs to be replaced with an sap.m.Link control. "text" and "textDirection" setters can be used for this aggregation.

Returns:
sap.m.Link
getDescription(): string

Gets current value of property description.

Determines the detailed description that shows additional information on the MessagePage.

Default value is Check the filter settings..

Returns:
stringValue of property description
getIcon(): sap.ui.core.URI

Gets current value of property icon.

Determines the icon displayed on the MessagePage.

Default value is sap-icon://documents.

Returns:
sap.ui.core.URIValue of property icon
getShowHeader(): boolean

Gets current value of property showHeader.

Determines the visibility of the MessagePage header. Can be used to hide the header of the MessagePage when it's embedded in another page.

Default value is true.

Returns:
booleanValue of property showHeader
getShowNavButton(): boolean

Gets current value of property showNavButton.

Determines the visibility of the navigation button in MessagePage header.

Default value is false.

Returns:
booleanValue of property showNavButton
getText(): string

Gets current value of property text.

Determines the main text displayed on the MessagePage.

Default value is No matching items found..

Returns:
stringValue of property text
getTextDirection(): sap.ui.core.TextDirection

Gets current value of property textDirection.

Determines the element's text directionality with enumerated options. By default, the control inherits text direction from the DOM.

Default value is Inherit.

Returns:
sap.ui.core.TextDirectionValue of property textDirection
getTitle(): string

Gets current value of property title.

Determines the title in the header of MessagePage.

Returns:
stringValue of property title
removeAllAriaDescribedBy(): sap.ui.core.ID[]
Removes all the controls in the association named ariaDescribedBy.
Returns:
sap.ui.core.ID[]An array of the removed elements (might be empty)
removeAllAriaLabelledBy(): sap.ui.core.ID[]
Removes all the controls in the association named ariaLabelledBy.
Returns:
sap.ui.core.ID[]An array of the removed elements (might be empty)
removeAriaDescribedBy(vAriaDescribedBy): sap.ui.core.ID
Removes an ariaDescribedBy from the association named ariaDescribedBy.
Parameters:
int|sap.ui.core.ID|sap.ui.core.ControlvAriaDescribedByThe ariaDescribedBy to be removed or its index or ID
Returns:
sap.ui.core.IDThe removed ariaDescribedBy or null
removeAriaLabelledBy(vAriaLabelledBy): sap.ui.core.ID
Removes an ariaLabelledBy from the association named ariaLabelledBy.
Parameters:
int|sap.ui.core.ID|sap.ui.core.ControlvAriaLabelledByThe ariaLabelledBy to be removed or its index or ID
Returns:
sap.ui.core.IDThe removed ariaLabelledBy or null
setCustomDescription(oCustomDescription): sap.m.MessagePage
Sets the aggregated customDescription.
Parameters:
sap.m.LinkoCustomDescriptionThe customDescription to set
Returns:
sap.m.MessagePageReference to this in order to allow method chaining
setCustomText(oCustomText): sap.m.MessagePage
Sets the aggregated customText.
Parameters:
sap.m.LinkoCustomTextThe customText to set
Returns:
sap.m.MessagePageReference to this in order to allow method chaining
setDescription(sDescription): sap.m.MessagePage

Sets a new value for property description.

Determines the detailed description that shows additional information on the MessagePage.

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

Default value is Check the filter settings..

Parameters:
stringsDescriptionNew value for property description
Returns:
sap.m.MessagePageReference to this in order to allow method chaining
setIcon(sIcon): sap.m.MessagePage

Sets a new value for property icon.

Determines the icon displayed on the MessagePage.

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

Default value is sap-icon://documents.

Parameters:
sap.ui.core.URIsIconNew value for property icon
Returns:
sap.m.MessagePageReference to this in order to allow method chaining
setShowHeader(bShowHeader): sap.m.MessagePage

Sets a new value for property showHeader.

Determines the visibility of the MessagePage header. Can be used to hide the header of the MessagePage when it's embedded in another page.

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

Default value is true.

Parameters:
booleanbShowHeaderNew value for property showHeader
Returns:
sap.m.MessagePageReference to this in order to allow method chaining
setShowNavButton(bShowNavButton): sap.m.MessagePage

Sets a new value for property showNavButton.

Determines the visibility of the navigation button in MessagePage header.

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

Default value is false.

Parameters:
booleanbShowNavButtonNew value for property showNavButton
Returns:
sap.m.MessagePageReference to this in order to allow method chaining
setText(sText): sap.m.MessagePage

Sets a new value for property text.

Determines the main text displayed on the MessagePage.

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

Default value is No matching items found..

Parameters:
stringsTextNew value for property text
Returns:
sap.m.MessagePageReference to this in order to allow method chaining
setTextDirection(sTextDirection): sap.m.MessagePage

Sets a new value for property textDirection.

Determines the element's text directionality with enumerated options. By default, the control inherits text direction from the DOM.

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

Default value is Inherit.

Parameters:
sap.ui.core.TextDirectionsTextDirectionNew value for property textDirection
Returns:
sap.m.MessagePageReference to this in order to allow method chaining
setTitle(sTitle): sap.m.MessagePage

Sets a new value for property title.

Determines the title in the header of MessagePage.

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

Parameters:
stringsTitleNew value for property title
Returns:
sap.m.MessagePageReference to this in order to allow method chaining