The NotificationListItem control shows notification to the user.
The notification item holds properties for the following elements:
description
- additional detail text.hideShowMoreButton
- visibility of the "Show More" button.truncate
- determines if title and description are truncated to the first two lines (usually needed on mobile devices).processingMessage
aggregation.
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 |
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 |
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 Accessibility support is provided through the associated highlightText property. If the |
highlightText | string | empty string | Defines the semantics of the highlight property for accessibility purposes. |
navigated | boolean | false | The navigated state of the list item. If set to |
selected | boolean | false | Defines the selected state of the list items. Note: Binding the |
type | sap.m.ListType | Inactive | Defines the visual indication and behavior of the list items, e.g. |
unread | boolean | false | Activates the unread indicator for the list item, if set to |
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 |
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 |
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
|
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 |
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 |
getHideShowMoreButton |
Gets current value of property hideShowMoreButton. Determines if the "Show More" button should be hidden. Default value is |
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 |
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 Default value is |
setAuthorInitials |
Sets a new value for property authorInitials. Defines the displayed author initials. When called with a value of |
setDescription |
Sets a new value for property description. Determines the description of the NotificationListItem. When called with a value of Default value is |
setHideShowMoreButton |
Sets a new value for property hideShowMoreButton. Determines if the "Show More" button should be hidden. When called with a value of Default value is |
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 Default value is |
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 |
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
.
Gets current value of property authorInitials.
Defines the displayed author initials.
Gets current value of property description.
Determines the description of the NotificationListItem.
Default value is empty string
.
Gets current value of property hideShowMoreButton.
Determines if the "Show More" button should be hidden.
Default value is false
.
Returns a metadata object for class sap.m.NotificationListItem.
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
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
.
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 |
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 |
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 |
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 |
Sets the aggregated processingMessage.
Param | Type | DefaultValue | Description |
---|---|---|---|
oProcessingMessage | sap.m.MessageStrip |
The processingMessage to set |
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 |