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.
Event Summary
navButtonPress(oControlEvent)This event is fired when Nav Button is pressed. 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
. 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
. detachNavButtonPress(fnFunction, oListener)Detaches event handler fnFunction
from the navButtonPress
event of this sap.m.MessagePage
. 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
. getIcon()Gets current value of property icon
. getText()Gets current value of property text
. getTitle()Gets current value of property title
. removeAriaDescribedBy(vAriaDescribedBy)Removes an ariaDescribedBy from the association named ariaDescribedBy
. removeAriaLabelledBy(vAriaLabelledBy)Removes an ariaLabelledBy from the association named ariaLabelledBy
. 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
. setText(sText)Sets a new value for property text
. setTitle(sTitle)Sets a new value for property title
. addStyleClass,
allowTextSelection,
attachBrowserEvent,
attachValidateFieldGroup,
checkFieldGroupIds,
clone,
detachBrowserEvent,
detachValidateFieldGroup,
fireValidateFieldGroup,
getAccessibilityInfo,
getBusy,
getBusyIndicatorDelay,
getControlsByFieldGroupId,
getFieldGroupIds,
getIdForLabel,
getRenderer,
getVisible,
hasStyleClass,
invalidate,
isBusy,
onAfterRendering,
onBeforeRendering,
placeAt,
removeStyleClass,
rerender,
setBusy,
setBusyIndicatorDelay,
setFieldGroupIds,
setVisible,
toggleStyleClass,
triggerValidateFieldGroup $,
addCustomData,
addDependent,
addEventDelegate,
applyFocusInfo,
bindElement,
data,
destroy,
destroyCustomData,
destroyDependents,
destroyLayoutData,
destroyTooltip,
enhanceAccessibilityState,
exit,
findElements,
fireEvent,
focus,
getCustomData,
getDependents,
getDomRef,
getElementBinding,
getFocusDomRef,
getFocusInfo,
getInterface,
getLayoutData,
getMetadata,
getTooltip,
getTooltip_AsString,
getTooltip_Text,
indexOfCustomData,
indexOfDependent,
init,
insertCustomData,
insertDependent,
prop,
removeAllCustomData,
removeAllDependents,
removeCustomData,
removeDependent,
removeEventDelegate,
setLayoutData,
setTooltip,
toString,
unbindElement addAggregation,
addAssociation,
applySettings,
attachFormatError,
attachModelContextChange,
attachParseError,
attachValidationError,
attachValidationSuccess,
bindAggregation,
bindContext,
bindObject,
bindProperty,
destroyAggregation,
detachFormatError,
detachModelContextChange,
detachParseError,
detachValidationError,
detachValidationSuccess,
findAggregatedObjects,
fireFormatError,
fireModelContextChange,
fireParseError,
fireValidationError,
fireValidationSuccess,
getAggregation,
getAssociation,
getBinding,
getBindingContext,
getBindingInfo,
getBindingPath,
getEventingParent,
getId,
getModel,
getObjectBinding,
getOriginInfo,
getParent,
getProperty,
hasModel,
indexOfAggregation,
insertAggregation,
isBound,
isInvalidateSuppressed,
isTreeBinding,
propagateMessages,
removeAggregation,
removeAllAggregation,
removeAllAssociation,
removeAssociation,
setAggregation,
setAssociation,
setBindingContext,
setModel,
setProperty,
unbindAggregation,
unbindContext,
unbindObject,
unbindProperty,
validateAggregation,
validateProperty 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:
- Properties
- text : string (default: No matching items found.)
- description : string (default: Check the filter settings.)
- title : string
- showHeader : boolean (default: true)
- showNavButton : boolean (default: false)
- icon : sap.ui.core.URI (default: sap-icon://documents)
- textDirection : sap.ui.core.TextDirection (default: Inherit)
- Aggregations
- Events
- navButtonPress : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]
In addition, all settings applicable to the base type sap.ui.core.Control can be used as well.
Parameters:
{string} | sId? | id for the new control, generated automatically if no id is given |
{object} | mSettings? | initial settings for the new control |
Event Detail
navButtonPress(oControlEvent)
This event is fired when Nav Button is pressed.
Parameters:
- 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:
{string} | sClassName | Name of the class being created |
{object} | oClassInfo? | Object literal with information about the class |
{function} | FNMetaImpl? | Constructor function for the metadata object; if not given, it defaults to sap.ui.core.ElementMetadata |
Returns:
{function} | Created class / constructor function |
Returns a metadata object for class sap.m.MessagePage.
Returns:
Adds some ariaDescribedBy into the association ariaDescribedBy
.
Parameters:
{string|sap.ui.core.Control} | vAriaDescribedBy | the ariaDescribedBy to add; if empty, nothing is inserted |
Returns:
Adds some ariaLabelledBy into the association ariaLabelledBy
.
Parameters:
{string|sap.ui.core.Control} | vAriaLabelledBy | the ariaLabelledBy to add; if empty, nothing is inserted |
Returns:
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:
{object} | oData? | An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
{function} | fnFunction | The function to be called when the event occurs |
{object} | oListener? | Context object to call the event handler with. Defaults to this sap.m.MessagePage itself |
- Since:
- 1.28.1
Returns:
Destroys the customDescription in the aggregation customDescription
.
Returns:
Destroys the customText in the aggregation customText
.
Returns:
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:
{function} | fnFunction | The function to be called, when the event occurs |
{object} | oListener | Context object on which the given function had to be called |
- Since:
- 1.28.1
Returns:
Fires event navButtonPress
to attached listeners.
Parameters:
{Map} | mArguments? | The arguments to pass along with the event |
- Since:
- 1.28.1
Returns:
Returns array of IDs of the elements which are the current targets of the association ariaDescribedBy
.
Returns:
Returns array of IDs of the elements which are the current targets of the association ariaLabelledBy
.
Returns:
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 a sap.m.Link control. "description" and "textDirection" setters can be used for this aggregation.
Returns:
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 a sap.m.Link control. "text" and "textDirection" setters can be used for this aggregation.
Returns:
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:
{string} | Value of property description |
Gets current value of property
icon
.
Determines the icon displayed on the MessagePage.
Default value is sap-icon://documents
.
Returns:
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:
{boolean} | Value 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:
{boolean} | Value 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:
{string} | Value of property text |
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:
getTitle(): string
Gets current value of property
title
.
Determines the title in the header of MessagePage.
Returns:
{string} | Value of property title |
Removes all the controls in the association named ariaDescribedBy
.
Returns:
Removes all the controls in the association named ariaLabelledBy
.
Returns:
Removes an ariaDescribedBy from the association named ariaDescribedBy
.
Parameters:
{int|string|sap.ui.core.Control} | vAriaDescribedBy | The ariaDescribedByto be removed or its index or ID |
Returns:
Removes an ariaLabelledBy from the association named ariaLabelledBy
.
Parameters:
{int|string|sap.ui.core.Control} | vAriaLabelledBy | The ariaLabelledByto be removed or its index or ID |
Returns:
Sets the aggregated customDescription
.
Parameters:
{sap.m.Link} | oCustomDescription | The customDescription to set |
Returns:
Sets the aggregated customText
.
Parameters:
Returns:
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:
{string} | sDescription | New value for property description |
Returns:
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:
Returns:
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:
{boolean} | bShowHeader | New value for property showHeader |
Returns:
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:
{boolean} | bShowNavButton | New value for property showNavButton |
Returns:
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:
{string} | sText | New value for property text |
Returns:
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:
Returns:
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:
{string} | sTitle | New value for property title |
Returns: