class sap.m.NotificationListGroup

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

The NotificationListGroup control is used for grouping notification items of the same type.

Behavior

The group handles specific behavior for different use cases:


Constructor

Constructor for a new NotificationListGroup.

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.NotificationListGroup(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
authorName string empty string

Determines the notification group's author name.

Visibility: public
authorPicture sap.ui.core.URI

Determines the URL of the notification group's author picture.

Visibility: public
autoPriority boolean true

Determines if the group will automatically set the priority based on the highest priority of its notifications or get its priority from the priority property.

Visibility: public
collapsed boolean false

Determines if the group is collapsed or expanded.

Visibility: public
datetime string empty string

Determines the due date of the NotificationListGroup.

Visibility: public
enableCollapseButtonWhenEmpty boolean false

Determines if the collapse/expand button for an empty group is displayed.

Visibility: public
showEmptyGroup boolean false

Determines if the group header/footer of the empty group will be always shown. By default groups with 0 notifications are not shown.

Visibility: public
showItemsCounter boolean true

Determines if the items counter inside the group header will be visible.

Note: Counter value represents the number of currently visible (loaded) items inside the group.

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: items

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

The collapse/expand button.

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

The NotificationListItems inside the group.

Borrowed Aggregations

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

Action buttons.


Events Overview

Event Description
onCollapse

onCollapse event is called when collapse property value is changed

Since: 1.44.

onCollapse

onCollapse event is called when collapse property value is changed

Since: 1.44.

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

Indicates exact collapse direction


Methods Overview

Method Description
addItem

Adds some item to the aggregation items.

attachOnCollapse

Attaches event handler fnFunction to the onCollapse event of this sap.m.NotificationListGroup.

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

onCollapse event is called when collapse property value is changed

destroyItems

Destroys all the items in the aggregation items.

detachOnCollapse

Detaches event handler fnFunction from the onCollapse event of this sap.m.NotificationListGroup.

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

sap.m.NotificationListGroup.extend

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

fireOnCollapse

Fires event onCollapse to attached listeners.

getAuthorName

Gets current value of property authorName.

Determines the notification group's author name.

Default value is empty string.

getAuthorPicture

Gets current value of property authorPicture.

Determines the URL of the notification group's author picture.

getAutoPriority

Gets current value of property autoPriority.

Determines if the group will automatically set the priority based on the highest priority of its notifications or get its priority from the priority property.

Default value is true.

getCollapsed

Gets current value of property collapsed.

Determines if the group is collapsed or expanded.

Default value is false.

getDatetime

Gets current value of property datetime.

Determines the due date of the NotificationListGroup.

Default value is empty string.

getEnableCollapseButtonWhenEmpty

Gets current value of property enableCollapseButtonWhenEmpty.

Determines if the collapse/expand button for an empty group is displayed.

Default value is false.

getItems

Gets content of aggregation items.

The NotificationListItems inside the group.

sap.m.NotificationListGroup.getMetadata

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

getShowEmptyGroup

Gets current value of property showEmptyGroup.

Determines if the group header/footer of the empty group will be always shown. By default groups with 0 notifications are not shown.

Default value is false.

getShowItemsCounter

Gets current value of property showItemsCounter.

Determines if the items counter inside the group header will be visible.

Note: Counter value represents the number of currently visible (loaded) items inside the group.

Default value is true.

indexOfItem

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

insertItem

Inserts a item into the aggregation items.

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.

setAuthorName

Sets a new value for property authorName.

Determines the notification group's author name.

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

Default value is empty string.

setAuthorPicture

Sets a new value for property authorPicture.

Determines the URL of the notification group's author picture.

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

setAutoPriority

Sets a new value for property autoPriority.

Determines if the group will automatically set the priority based on the highest priority of its notifications or get its priority from the priority property.

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

Default value is true.

setCollapsed

Sets a new value for property collapsed.

Determines if the group is collapsed or expanded.

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

Default value is false.

setDatetime

Sets a new value for property datetime.

Determines the due date of the NotificationListGroup.

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

Default value is empty string.

setEnableCollapseButtonWhenEmpty

Sets a new value for property enableCollapseButtonWhenEmpty.

Determines if the collapse/expand button for an empty group is displayed.

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

Default value is false.

setShowEmptyGroup

Sets a new value for property showEmptyGroup.

Determines if the group header/footer of the empty group will be always shown. By default groups with 0 notifications are not shown.

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

Default value is false.

setShowItemsCounter

Sets a new value for property showItemsCounter.

Determines if the items counter inside the group header will be visible.

Note: Counter value represents the number of currently visible (loaded) items inside the group.

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

Default value is true.

addItem

Adds some item to the aggregation items.

Param Type DefaultValue Description
oItem sap.m.NotificationListItem

The item to add; if empty, nothing is inserted

attachOnCollapse

Attaches event handler fnFunction to the onCollapse event of this sap.m.NotificationListGroup.

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

onCollapse event is called when collapse property value is changed

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

destroyItems

Destroys all the items in the aggregation items.

detachOnCollapse

Detaches event handler fnFunction from the onCollapse event of this sap.m.NotificationListGroup.

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.NotificationListGroup.extend

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

fireOnCollapse

Fires event onCollapse to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

collapsed boolean

Indicates exact collapse direction

getAuthorName

Gets current value of property authorName.

Determines the notification group's author name.

Default value is empty string.

getAuthorPicture

Gets current value of property authorPicture.

Determines the URL of the notification group's author picture.

getAutoPriority

Gets current value of property autoPriority.

Determines if the group will automatically set the priority based on the highest priority of its notifications or get its priority from the priority property.

Default value is true.

getCollapsed

Gets current value of property collapsed.

Determines if the group is collapsed or expanded.

Default value is false.

getDatetime

Gets current value of property datetime.

Determines the due date of the NotificationListGroup.

Default value is empty string.

getEnableCollapseButtonWhenEmpty

Gets current value of property enableCollapseButtonWhenEmpty.

Determines if the collapse/expand button for an empty group is displayed.

Default value is false.

getItems

Gets content of aggregation items.

The NotificationListItems inside the group.

sap.m.NotificationListGroup.getMetadata

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

getShowEmptyGroup

Gets current value of property showEmptyGroup.

Determines if the group header/footer of the empty group will be always shown. By default groups with 0 notifications are not shown.

Default value is false.

getShowItemsCounter

Gets current value of property showItemsCounter.

Determines if the items counter inside the group header will be visible.

Note: Counter value represents the number of currently visible (loaded) items inside the group.

Default value is true.

indexOfItem

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

Param Type DefaultValue Description
oItem sap.m.NotificationListItem

The item whose index is looked for

insertItem

Inserts a item into the aggregation items.

Param Type DefaultValue Description
oItem sap.m.NotificationListItem

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

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.NotificationListItem

The item to remove or its index or id

setAuthorName

Sets a new value for property authorName.

Determines the notification group's author name.

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
sAuthorName string ''

New value for property authorName

setAuthorPicture

Sets a new value for property authorPicture.

Determines the URL of the notification group's author picture.

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

Param Type DefaultValue Description
sAuthorPicture sap.ui.core.URI

New value for property authorPicture

setAutoPriority

Sets a new value for property autoPriority.

Determines if the group will automatically set the priority based on the highest priority of its notifications or get its priority from the priority property.

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

New value for property autoPriority

setCollapsed

Sets a new value for property collapsed.

Determines if the group is collapsed or expanded.

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

New value for property collapsed

setDatetime

Sets a new value for property datetime.

Determines the due date of the NotificationListGroup.

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
sDatetime string ''

New value for property datetime

setEnableCollapseButtonWhenEmpty

Sets a new value for property enableCollapseButtonWhenEmpty.

Determines if the collapse/expand button for an empty group is displayed.

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

New value for property enableCollapseButtonWhenEmpty

setShowEmptyGroup

Sets a new value for property showEmptyGroup.

Determines if the group header/footer of the empty group will be always shown. By default groups with 0 notifications are not shown.

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

New value for property showEmptyGroup

setShowItemsCounter

Sets a new value for property showItemsCounter.

Determines if the items counter inside the group header will be visible.

Note: Counter value represents the number of currently visible (loaded) items inside the group.

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

New value for property showItemsCounter