Class sap.m.NotificationListBaseModule: sap/m/NotificationListBase

extends ListItemBase

The NotificationListBase is the base class for NotificationListItem and NotificationListGroup.


Since: 1.38.
Constructor Summary
new sap.m.NotificationListBase(sId?, mSettings?)Constructor for a new NotificationListBase.
Fields borrowed from class sap.m.ListItemBase
Event Summary
close(oControlEvent)Fired when the notification is closed.
Events borrowed from class sap.m.ListItemBase
Events borrowed from class sap.ui.core.Control
Method Summary
sap.m.NotificationListBase.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.m.NotificationListBase with name sClassName and enriches it with the information contained in oClassInfo.
sap.m.NotificationListBase.getMetadata()Returns a metadata object for class sap.m.NotificationListBase.
_getAuthorImage()Returns the sap.m.Image or the sap.ui.core.Control used in the NotificationListBase's author picture.
_getAuthorName()Returns the sap.m.Text control used in the NotificationListBase's author name.
_getDateTimeText()Returns the sap.m.Text control used in the NotificationListBase's header title.
_getHeaderTitle()Returns the sap.m.Text control used in the NotificationListBase's header title.
_getToolbar()Returns the sap.m.OverflowToolbar control used in the NotificationListBase.
addButton(oButton)Adds some button to the aggregation buttons.
attachClose(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the close event of this sap.m.NotificationListBase.
destroyButtons()Destroys all the buttons in the aggregation buttons.
detachClose(fnFunction, oListener)Detaches event handler fnFunction from the close event of this sap.m.NotificationListBase.
fireClose(mArguments?)Fires event close to attached listeners.
getAuthorName()Gets current value of property authorName.
getAuthorPicture()Gets current value of property authorPicture.
getButtons()Gets content of aggregation buttons.
getDatetime()Gets current value of property datetime.
getPriority()Gets current value of property priority.
getShowButtons()Gets current value of property showButtons.
getShowCloseButton()Gets current value of property showCloseButton.
getTitle()Gets current value of property title.
indexOfButton(oButton)Checks for the provided sap.m.Button in the aggregation buttons.
insertButton(oButton, iIndex)Inserts a button into the aggregation buttons.
removeAllButtons()Removes all the controls from the aggregation buttons.
removeButton(vButton)Removes a button from the aggregation buttons.
setAuthorName(sAuthorName)Sets a new value for property authorName.
setAuthorPicture(sAuthorPicture)Sets a new value for property authorPicture.
setDatetime(sDatetime)Sets a new value for property datetime.
setPriority(sPriority)Sets a new value for property priority.
setShowButtons(bShowButtons)Sets a new value for property showButtons.
setShowCloseButton(bShowCloseButton)Sets a new value for property showCloseButton.
setTitle(sTitle)Sets a new value for property title.
Constructor Detail
new sap.m.NotificationListBase(sId?, mSettings?)
Constructor for a new NotificationListBase.

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
  • Aggregations
  • Events
    • close : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]

In addition, all settings applicable to the base type sap.m.ListItemBase 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
close(oControlEvent)
Fired when the notification is closed.
Parameters:
{sap.ui.base.Event}oControlEvent
{sap.ui.base.EventProvider}oControlEvent.getSource
{object}oControlEvent.getParameters
Method Detail
sap.m.NotificationListBase.extend(sClassName, oClassInfo?, FNMetaImpl?): function
Creates a new subclass of class sap.m.NotificationListBase 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.ListItemBase.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
sap.m.NotificationListBase.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.m.NotificationListBase.
Returns:
{sap.ui.base.Metadata} Metadata object describing this class
_getAuthorImage(): sap.m.Image|sap.ui.core.Control
Returns the sap.m.Image or the sap.ui.core.Control used in the NotificationListBase's author picture.
Returns:
{sap.m.Image|sap.ui.core.Control} The notification author picture text
_getAuthorName(): sap.m.Text
Returns the sap.m.Text control used in the NotificationListBase's author name.
Returns:
{sap.m.Text} The notification author name text
_getDateTimeText(): sap.m.Text
Returns the sap.m.Text control used in the NotificationListBase's header title.
Returns:
{sap.m.Text} The datetime control inside the Notification List Base control
_getHeaderTitle(): sap.m.Text
Returns the sap.m.Text control used in the NotificationListBase's header title.
Returns:
{sap.m.Text} The title control inside the Notification List Base control
_getToolbar(): sap.m.OverflowToolbar
Returns the sap.m.OverflowToolbar control used in the NotificationListBase.
Returns:
{sap.m.OverflowToolbar} The footer toolbar
addButton(oButton): sap.m.NotificationListBase
Adds some button to the aggregation buttons.
Parameters:
{sap.m.Button}oButton the button to add; if empty, nothing is inserted
Returns:
{sap.m.NotificationListBase} Reference to this in order to allow method chaining
attachClose(oData?, fnFunction, oListener?): sap.m.NotificationListBase
Attaches event handler fnFunction to the close event of this sap.m.NotificationListBase.

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

Fired when the notification is closed.

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.NotificationListBase itself
Returns:
{sap.m.NotificationListBase} Reference to this in order to allow method chaining
destroyButtons(): sap.m.NotificationListBase
Destroys all the buttons in the aggregation buttons.
Returns:
{sap.m.NotificationListBase} Reference to this in order to allow method chaining
detachClose(fnFunction, oListener): sap.m.NotificationListBase
Detaches event handler fnFunction from the close event of this sap.m.NotificationListBase.

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
Returns:
{sap.m.NotificationListBase} Reference to this in order to allow method chaining
fireClose(mArguments?): sap.m.NotificationListBase
Fires event close to attached listeners.
Parameters:
{Map}mArguments? The arguments to pass along with the event
Returns:
{sap.m.NotificationListBase} Reference to this in order to allow method chaining
getAuthorName(): string
Gets current value of property authorName.

Determines the notification group's author name.

Default value is .

Returns:
{string} Value of property authorName
getAuthorPicture(): sap.ui.core.URI
Gets current value of property authorPicture.

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

Returns:
{sap.ui.core.URI} Value of property authorPicture
getButtons(): sap.m.Button[]
Gets content of aggregation buttons.

Action buttons.

Returns:
{sap.m.Button[]}
getDatetime(): string
Gets current value of property datetime.

Determines the due date of the NotificationListItem.

Default value is .

Returns:
{string} Value of property datetime
getPriority(): sap.ui.core.Priority
Gets current value of property priority.

Determines the priority of the Notification.

Default value is None.

Returns:
{sap.ui.core.Priority} Value of property priority
getShowButtons(): boolean
Gets current value of property showButtons.

Determines the action buttons visibility.

Default value is true.

Returns:
{boolean} Value of property showButtons
getShowCloseButton(): boolean
Gets current value of property showCloseButton.

Determines the visibility of the close button.

Default value is true.

Returns:
{boolean} Value of property showCloseButton
getTitle(): string
Gets current value of property title.

Determines the title of the NotificationListBase item.

Default value is .

Returns:
{string} Value of property title
indexOfButton(oButton): int
Checks for the provided sap.m.Button in the aggregation buttons. and returns its index if found or -1 otherwise.
Parameters:
{sap.m.Button}oButton The button whose index is looked for
Returns:
{int} The index of the provided control in the aggregation if found, or -1 otherwise
insertButton(oButton, iIndex): sap.m.NotificationListBase
Inserts a button into the aggregation buttons.
Parameters:
{sap.m.Button}oButton the button to insert; if empty, nothing is inserted
{int}iIndex the 0-based index the button should be inserted at; for a negative value of iIndex, the button is inserted at position 0; for a value greater than the current size of the aggregation, the button is inserted at the last position
Returns:
{sap.m.NotificationListBase} Reference to this in order to allow method chaining
removeAllButtons(): sap.m.Button[]
Removes all the controls from the aggregation buttons.

Additionally, it unregisters them from the hosting UIArea.

Returns:
{sap.m.Button[]} An array of the removed elements (might be empty)
removeButton(vButton): sap.m.Button
Removes a button from the aggregation buttons.
Parameters:
{int|string|sap.m.Button}vButton The buttonto remove or its index or id
Returns:
{sap.m.Button} The removed button or null
setAuthorName(sAuthorName): sap.m.NotificationListBase
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 .

Parameters:
{string}sAuthorName New value for property authorName
Returns:
{sap.m.NotificationListBase} Reference to this in order to allow method chaining
setAuthorPicture(sAuthorPicture): sap.m.NotificationListBase
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.

Parameters:
{sap.ui.core.URI}sAuthorPicture New value for property authorPicture
Returns:
{sap.m.NotificationListBase} Reference to this in order to allow method chaining
setDatetime(sDatetime): sap.m.NotificationListBase
Sets a new value for property datetime.

Determines the due date of the NotificationListItem.

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

Default value is .

Parameters:
{string}sDatetime New value for property datetime
Returns:
{sap.m.NotificationListBase} Reference to this in order to allow method chaining
setPriority(sPriority): sap.m.NotificationListBase
Sets a new value for property priority.

Determines the priority of the Notification.

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

Default value is None.

Parameters:
{sap.ui.core.Priority}sPriority New value for property priority
Returns:
{sap.m.NotificationListBase} Reference to this in order to allow method chaining
setShowButtons(bShowButtons): sap.m.NotificationListBase
Sets a new value for property showButtons.

Determines the action buttons visibility.

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

Default value is true.

Parameters:
{boolean}bShowButtons New value for property showButtons
Returns:
{sap.m.NotificationListBase} Reference to this in order to allow method chaining
setShowCloseButton(bShowCloseButton): sap.m.NotificationListBase
Sets a new value for property showCloseButton.

Determines the visibility of the close button.

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

Default value is true.

Parameters:
{boolean}bShowCloseButton New value for property showCloseButton
Returns:
{sap.m.NotificationListBase} Reference to this in order to allow method chaining
setTitle(sTitle): sap.m.NotificationListBase
Sets a new value for property title.

Determines the title of the NotificationListBase item.

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

Default value is .

Parameters:
{string}sTitle New value for property title
Returns:
{sap.m.NotificationListBase} Reference to this in order to allow method chaining