class sap.m.NotificationListItem

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

The NotificationListItem control shows notification to the user.

Structure

The notification item holds properties for the following elements:

For each item you can set some additional status information about the item processing by adding a sap.m.MessageStrip to the processingMessage aggregation.


Constructor

Constructor for a new NotificationListItem.

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.NotificationListItem(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
authorAvatarColor sap.m.AvatarColor Accent6

Determines the background color of the avatar of the author.

Note: By using background colors from the predefined sets, your colors can later be customized from the Theme Designer.

Visibility: public
authorInitials string

Defines the displayed author initials.

Visibility: public
description string empty string

Determines the description of the NotificationListItem.

Visibility: public
hideShowMoreButton boolean false

Determines if the "Show More" button should be hidden.

Visibility: public
truncate boolean true

Determines if the text in the title and the description of the notification are truncated to the first two lines.

Visibility: public

Borrowed Properties

Name Type Default Value Description
authorName string empty string

Determines the notification author name.

Visibility: public
authorPicture sap.ui.core.URI

Determines the URL of the notification author picture.

Visibility: public
datetime string empty string

The time stamp of the Notification.

Visibility: public
priority sap.ui.core.Priority None

Determines the priority of the Notification.

Visibility: public
showButtons boolean true

Determines the action buttons visibility.

Note: Action buttons are not shown when Notification List Groups are collapsed.

Visibility: public
showCloseButton boolean true

Determines the visibility of the close button.

Visibility: public
title string empty string

Determines the title of the NotificationListBase item.

Visibility: public
counter int

Defines the counter value of the list items.

Visibility: public
highlight string None

Defines the highlight state of the list items.

Valid values for the highlight property are values of the enumerations sap.ui.core.MessageType or sap.ui.core.IndicationColor.

Accessibility support is provided through the associated highlightText property. If the highlight property is set to a value of sap.ui.core.MessageType, the highlightText property does not need to be set because a default text is used. However, the default text can be overridden by setting the highlightText property. In all other cases the highlightText property must be set.

Since: 1.44.0.

Visibility: public
highlightText string empty string

Defines the semantics of the highlight property for accessibility purposes.

Since: 1.62.

Visibility: public
navigated boolean false

The navigated state of the list item.

If set to true, a navigation indicator is displayed at the end of the list item. Note: This property must be set for one list item only.

Since: 1.72.

Visibility: public
selected boolean false

Defines the selected state of the list items. Note: Binding the selected property in single selection modes may cause unwanted results if you have more than one selected items in your binding.

Visibility: public
type sap.m.ListType Inactive

Defines the visual indication and behavior of the list items, e.g. Active, Navigation, Detail.

Visibility: public
unread boolean false

Activates the unread indicator for the list item, if set to true. Note: This flag is ignored when the showUnread property of the parent is set to false.

Visibility: public
visible boolean true

Whether the control should be visible on the screen. If set to false, a placeholder is rendered instead of the real control.

Visibility: public

Aggregations

Default Aggregation:

Name Cardinality Type Description
_showMoreButton 0..1 sap.m.Link

The "Show More" button of the notification item.

processingMessage 0..1 sap.m.MessageStrip

The sap.m.MessageStrip control that holds the information about any error that may occur when pressing the notification buttons

Borrowed Aggregations

Name Cardinality Type Description
buttons 0..n sap.m.Button

Action buttons.


Methods Overview

Method Description
destroyProcessingMessage

Destroys the processingMessage in the aggregation processingMessage.

sap.m.NotificationListItem.extend

Creates a new subclass of class sap.m.NotificationListItem with name sClassName and enriches it with the information contained in oClassInfo.

oClassInfo might contain the same kind of information as described in sap.m.NotificationListBase.extend.

getAuthorAvatarColor

Gets current value of property authorAvatarColor.

Determines the background color of the avatar of the author.

Note: By using background colors from the predefined sets, your colors can later be customized from the Theme Designer.

Default value is Accent6.

getAuthorInitials

Gets current value of property authorInitials.

Defines the displayed author initials.

getDescription

Gets current value of property description.

Determines the description of the NotificationListItem.

Default value is empty string.

getHideShowMoreButton

Gets current value of property hideShowMoreButton.

Determines if the "Show More" button should be hidden.

Default value is false.

sap.m.NotificationListItem.getMetadata

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

getProcessingMessage

Gets content of aggregation processingMessage.

The sap.m.MessageStrip control that holds the information about any error that may occur when pressing the notification buttons

getTruncate

Gets current value of property truncate.

Determines if the text in the title and the description of the notification are truncated to the first two lines.

Default value is true.

setAuthorAvatarColor

Sets a new value for property authorAvatarColor.

Determines the background color of the avatar of the author.

Note: By using background colors from the predefined sets, your colors can later be customized from the Theme Designer.

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

Default value is Accent6.

setAuthorInitials

Sets a new value for property authorInitials.

Defines the displayed author initials.

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.

Determines the description of the NotificationListItem.

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

Default value is empty string.

setHideShowMoreButton

Sets a new value for property hideShowMoreButton.

Determines if the "Show More" button should be hidden.

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

Default value is false.

setProcessingMessage

Sets the aggregated processingMessage.

setTruncate

Sets a new value for property truncate.

Determines if the text in the title and the description of the notification are truncated to the first two lines.

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

Default value is true.

destroyProcessingMessage

Destroys the processingMessage in the aggregation processingMessage.

sap.m.NotificationListItem.extend

Creates a new subclass of class sap.m.NotificationListItem with name sClassName and enriches it with the information contained in oClassInfo.

oClassInfo might contain the same kind of information as described in sap.m.NotificationListBase.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

getAuthorAvatarColor

Gets current value of property authorAvatarColor.

Determines the background color of the avatar of the author.

Note: By using background colors from the predefined sets, your colors can later be customized from the Theme Designer.

Default value is Accent6.

getAuthorInitials

Gets current value of property authorInitials.

Defines the displayed author initials.

getDescription

Gets current value of property description.

Determines the description of the NotificationListItem.

Default value is empty string.

getHideShowMoreButton

Gets current value of property hideShowMoreButton.

Determines if the "Show More" button should be hidden.

Default value is false.

sap.m.NotificationListItem.getMetadata

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

getProcessingMessage

Gets content of aggregation processingMessage.

The sap.m.MessageStrip control that holds the information about any error that may occur when pressing the notification buttons

getTruncate

Gets current value of property truncate.

Determines if the text in the title and the description of the notification are truncated to the first two lines.

Default value is true.

setAuthorAvatarColor

Sets a new value for property authorAvatarColor.

Determines the background color of the avatar of the author.

Note: By using background colors from the predefined sets, your colors can later be customized from the Theme Designer.

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

Default value is Accent6.

Param Type DefaultValue Description
sAuthorAvatarColor sap.m.AvatarColor Accent6

New value for property authorAvatarColor

setAuthorInitials

Sets a new value for property authorInitials.

Defines the displayed author initials.

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

Param Type DefaultValue Description
sAuthorInitials string

New value for property authorInitials

setDescription

Sets a new value for property description.

Determines the description of the NotificationListItem.

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

setHideShowMoreButton

Sets a new value for property hideShowMoreButton.

Determines if the "Show More" button should be hidden.

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

New value for property hideShowMoreButton

setProcessingMessage

Sets the aggregated processingMessage.

Param Type DefaultValue Description
oProcessingMessage sap.m.MessageStrip

The processingMessage to set

setTruncate

Sets a new value for property truncate.

Determines if the text in the title and the description of the notification are truncated to the first two lines.

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
bTruncate boolean true

New value for property truncate