A NotificationBar is a "toolbar" that can be added to a page to show messages and notifications from the application. Its position, height and width is inherited from the element that the notification bar is added to.
Deprecated API:Since version 1.38. Instead, use the sap.m.MessagePopover
control.
Since: 1.7.0.
Event Summary
display(oControlEvent)Event is fired when the bar wants to be displayed depending on given flag. resize(oControlEvent)This event is thrown when the bar was resized (to the different valid states: Min, Max, Default, None). Method Summary
sap.ui.ux3.NotificationBar.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.ui.ux3.NotificationBar with name sClassName
and enriches it with the information contained in oClassInfo
. addNotifier(oNotifier)Adds some notifier to the aggregation notifiers
. attachDisplay(oData?, fnFunction, oListener?)Attaches event handler fnFunction
to the display
event of this sap.ui.ux3.NotificationBar
. attachResize(oData?, fnFunction, oListener?)Attaches event handler fnFunction
to the resize
event of this sap.ui.ux3.NotificationBar
. detachDisplay(fnFunction, oListener)Detaches event handler fnFunction
from the display
event of this sap.ui.ux3.NotificationBar
. detachResize(fnFunction, oListener)Detaches event handler fnFunction
from the resize
event of this sap.ui.ux3.NotificationBar
. fireDisplay(mArguments?)Fires event display
to attached listeners. fireResize(mArguments?)Fires event resize
to attached listeners. hasItems()This method checks if the NotificationBar has any items (notifications or messages) to show and returns true if there are any items to show. indexOfNotifier(oNotifier)Checks for the provided sap.ui.core.Element
in the aggregation notifiers
. insertNotifier(oNotifier, iIndex)Inserts a notifier into the aggregation notifiers
. removeNotifier(vNotifier)Removes a notifier from the aggregation notifiers
. addStyleClass,
allowTextSelection,
attachBrowserEvent,
attachValidateFieldGroup,
checkFieldGroupIds,
clone,
detachBrowserEvent,
detachValidateFieldGroup,
fireValidateFieldGroup,
getAccessibilityInfo,
getBusy,
getBusyIndicatorDelay,
getControlsByFieldGroupId,
getFieldGroupIds,
getIdForLabel,
getRenderer,
getVisible,
hasStyleClass,
invalidate,
isBusy,
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.ui.ux3.NotificationBar(sId?, mSettings?)
Constructor for a new NotificationBar.
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
- display : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]
- resize : 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 |
- Deprecated:
- Since version 1.38. Instead, use the
sap.m.MessagePopover
control.
Event Detail
display(oControlEvent)
Event is fired when the bar wants to be displayed depending on given flag. This allows the application to decide what to do.
Parameters:
resize(oControlEvent)
This event is thrown when the bar was resized (to the different valid states: Min, Max, Default, None). The event itself can be used from SAPUI5-version 1.12.2 since there was a bug in the previous versions firing this event.
Parameters:
- Since:
- 1.12.2
Method Detail
sap.ui.ux3.NotificationBar.extend(sClassName, oClassInfo?, FNMetaImpl?): function
Creates a new subclass of class sap.ui.ux3.NotificationBar 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.ui.ux3.NotificationBar.
Returns:
Adds some notifier to the aggregation notifiers
.
Parameters:
Returns:
Attaches event handler
fnFunction
to the
display
event of this
sap.ui.ux3.NotificationBar
.
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.ui.ux3.NotificationBar
itself.
Event is fired when the bar wants to be displayed depending on given flag. This allows the application to decide what to do.
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.ui.ux3.NotificationBar itself |
Returns:
Attaches event handler
fnFunction
to the
resize
event of this
sap.ui.ux3.NotificationBar
.
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.ui.ux3.NotificationBar
itself.
This event is thrown when the bar was resized (to the different valid states: Min, Max, Default, None). The event itself can be used from SAPUI5-version 1.12.2 since there was a bug in the previous versions firing this event.
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.ui.ux3.NotificationBar itself |
- Since:
- 1.12.2
Returns:
Destroys the messageNotifier in the aggregation messageNotifier
.
Returns:
Destroys all the notifiers in the aggregation notifiers
.
Returns:
Detaches event handler
fnFunction
from the
display
event of this
sap.ui.ux3.NotificationBar
.
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:
Detaches event handler
fnFunction
from the
resize
event of this
sap.ui.ux3.NotificationBar
.
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.12.2
Returns:
Fires event
display
to attached listeners.
Expects the following event parameters:
show
of type boolean
Indicates if the bar wants to be shown or hidden
Parameters:
{Map} | mArguments? | The arguments to pass along with the event |
Returns:
Fires event
resize
to attached listeners.
Expects the following event parameters:
status
of type sap.ui.ux3.NotificationBarStatus
The corresponding status to which the bar was resized. The corresponding heights can be taken for the bar's CSS file.
Parameters:
{Map} | mArguments? | The arguments to pass along with the event |
- Since:
- 1.12.2
Returns:
getAlwaysShowToggler(): boolean
Gets current value of property
alwaysShowToggler
.
This property defines if the toggler should be displayed the whole time when the NotificationBar is shown.
Default value is false
.
Returns:
{boolean} | Value of property alwaysShowToggler |
Gets content of aggregation
messageNotifier
.
Notifier that shows messages
Returns:
Gets content of aggregation
notifiers
.
Notifiers that monitor something within the application and display the corresponding notifications.
Returns:
getResizeEnabled(): boolean
Gets current value of property
resizeEnabled
.
This property enables the bar to be resized by the user.
Default value is true
.
Returns:
{boolean} | Value of property resizeEnabled |
Gets current value of property
visibleStatus
.
This property displays the bar corresponding to given status
Default value is Default
.
Returns:
hasItems(): boolean
This method checks if the NotificationBar has any items (notifications or messages) to show and returns true if there are any items to show. So the application should decide if the bar should be displayed.
Returns:
indexOfNotifier(oNotifier): int
Checks for the provided sap.ui.core.Element
in the aggregation notifiers
. and returns its index if found or -1 otherwise.
Parameters:
Returns:
{int} | The index of the provided control in the aggregation if found, or -1 otherwise |
Inserts a notifier into the aggregation notifiers
.
Parameters:
{sap.ui.core.Element} | oNotifier | the notifier to insert; if empty, nothing is inserted |
{int} | iIndex | the 0 -based index the notifier should be inserted at; for a negative value of iIndex , the notifier is inserted at position 0; for a value greater than the current size of the aggregation, the notifier is inserted at the last position |
Returns:
Removes all the controls from the aggregation
notifiers
.
Additionally, it unregisters them from the hosting UIArea.
Returns:
Removes a notifier from the aggregation notifiers
.
Parameters:
Returns:
setAlwaysShowToggler(boolean?)
Parameters:
{bAlwaysShow} | boolean? | if the toggler should be visible all the time set this parameter to true |
- Since:
- 1.22.11
Sets the aggregated messageNotifier
.
Parameters:
Returns:
Sets a new value for property
resizeEnabled
.
This property enables the bar to be resized by the user.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is true
.
Parameters:
{boolean} | bResizeEnabled | New value for property resizeEnabled |
Returns:
Sets a new value for property
visibleStatus
.
This property displays the bar corresponding to given status
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is Default
.
Parameters:
Returns: