Class sap.m.BusyDialogModule: sap/m/BusyDialog

extends Control

BusyDialog is used to indicate that the system is busy.

Overview

When the busy dialog is displayed, the whole application is blocked.

Structure

The busy dialog can hold several elements, most of which are optional.

  • title - A title for the dialog. By default, there is no title.
  • text - A text displayed above the busy animation.
  • showCancelButton - An optional Cancel button to stop the execution.
  • customIcon - An optional alternative icon to use as a busy animation.

Usage

When to use

  • The operation lasts more than one second.
  • You want to indicate loading in a page-to-page navigation (lightweight version).
  • Offer a Cancel button if you expect the process to run more than 10 seconds.
  • If you do not show a title or text, use the invisible text control to provide the reason for users with assertive technologies.

When not to use

  • The screen is not supposed to be blocked. Use a sap.m.BusyIndicator for the specific application part.
  • Do not use the title of the busy dialog. Provide a precise text describing the operation in text.
Constructor Summary
new sap.m.BusyDialog(sId?, mSettings?)Constructor for a new BusyDialog.
Event Summary
close(oControlEvent)Fires when the busy dialog is closed.
Events borrowed from class sap.ui.core.Control
Method Summary
sap.m.BusyDialog.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.m.BusyDialog with name sClassName and enriches it with the information contained in oClassInfo.
sap.m.BusyDialog.getMetadata()Returns a metadata object for class sap.m.BusyDialog.
addAriaLabelledBy(vAriaLabelledBy)Adds some ariaLabelledBy into the association ariaLabelledBy.
attachClose(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the close event of this sap.m.BusyDialog.
close()Closes the BusyDialog.
detachClose(fnFunction, oListener)Detaches event handler fnFunction from the close event of this sap.m.BusyDialog.
fireClose(mParameters?)Fires event close to attached listeners.
getAriaLabelledBy()Returns array of IDs of the elements which are the current targets of the association ariaLabelledBy.
getCancelButtonText()Gets current value of property cancelButtonText.
getCustomIcon()Gets current value of property customIcon.
getCustomIconDensityAware()Gets current value of property customIconDensityAware.
getCustomIconHeight()Gets current value of property customIconHeight.
getCustomIconRotationSpeed()Gets current value of property customIconRotationSpeed.
getCustomIconWidth()Gets current value of property customIconWidth.
getShowCancelButton()Gets current value of property showCancelButton.
getText()Gets current value of property text.
getTitle()Gets current value of property title.
open()Opens the BusyDialog.
removeAllAriaLabelledBy()Removes all the controls in the association named ariaLabelledBy.
removeAriaLabelledBy(vAriaLabelledBy)Removes an ariaLabelledBy from the association named ariaLabelledBy.
setCancelButtonText(sCancelButtonText)Sets a new value for property cancelButtonText.
setCustomIcon(sCustomIcon)Sets a new value for property customIcon.
setCustomIconDensityAware(bCustomIconDensityAware)Sets a new value for property customIconDensityAware.
setCustomIconHeight(sCustomIconHeight)Sets a new value for property customIconHeight.
setCustomIconRotationSpeed(iCustomIconRotationSpeed)Sets a new value for property customIconRotationSpeed.
setCustomIconWidth(sCustomIconWidth)Sets a new value for property customIconWidth.
setShowCancelButton(bShowCancelButton)Sets a new value for property showCancelButton.
setText(sText)Sets a new value for property text.
setTitle(sTitle)Sets a new value for property title.
Constructor Detail
new sap.m.BusyDialog(sId?, mSettings?)

Constructor for a new BusyDialog.

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:

In addition, all settings applicable to the base type sap.ui.core.Control can be used as well.

Parameters:
stringsId?ID for the new control, generated automatically if no ID is given.
objectmSettings?Initial settings for the new control.
Event Detail
close(oControlEvent)
Fires when the busy dialog is closed.
Parameters:
sap.ui.base.EventoControlEvent
sap.ui.base.EventProvideroControlEvent.getSource
objectoControlEvent.getParameters
booleanoControlEvent.getParameters.cancelPressedIndicates if the close events are triggered by a user, pressing a cancel button or because the operation was terminated. This parameter is set to true if the close event is fired by user interaction.
Method Detail
sap.m.BusyDialog.extend(sClassName, oClassInfo?, FNMetaImpl?): function

Creates a new subclass of class sap.m.BusyDialog 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:
stringsClassNameName of the class being created
objectoClassInfo?Object literal with information about the class
functionFNMetaImpl?Constructor function for the metadata object; if not given, it defaults to sap.ui.core.ElementMetadata
Returns:
functionCreated class / constructor function
sap.m.BusyDialog.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.m.BusyDialog.
Returns:
sap.ui.base.MetadataMetadata object describing this class
addAriaLabelledBy(vAriaLabelledBy): sap.m.BusyDialog
Adds some ariaLabelledBy into the association ariaLabelledBy.
Parameters:
sap.ui.core.ID|sap.ui.core.ControlvAriaLabelledBythe ariaLabelledBy to add; if empty, nothing is inserted
Returns:
sap.m.BusyDialogReference to this in order to allow method chaining
attachClose(oData?, fnFunction, oListener?): sap.m.BusyDialog

Attaches event handler fnFunction to the close event of this sap.m.BusyDialog.

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

Fires when the busy dialog is closed.

Parameters:
objectoData?An application-specific payload object that will be passed to the event handler along with the event object when firing the event
functionfnFunctionThe function to be called when the event occurs
objectoListener?Context object to call the event handler with. Defaults to this sap.m.BusyDialog itself
Returns:
sap.m.BusyDialogReference to this in order to allow method chaining
Closes the BusyDialog.
Returns:
sap.m.BusyDialog
detachClose(fnFunction, oListener): sap.m.BusyDialog

Detaches event handler fnFunction from the close event of this sap.m.BusyDialog.

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

Parameters:
functionfnFunctionThe function to be called, when the event occurs
objectoListenerContext object on which the given function had to be called
Returns:
sap.m.BusyDialogReference to this in order to allow method chaining
fireClose(mParameters?): sap.m.BusyDialog
Fires event close to attached listeners.
Parameters:
objectmParameters?Parameters to pass along with the event
booleanmParameters.cancelPressed?Indicates if the close events are triggered by a user, pressing a cancel button or because the operation was terminated. This parameter is set to true if the close event is fired by user interaction.
Returns:
sap.m.BusyDialogReference to this in order to allow method chaining
getAriaLabelledBy(): sap.ui.core.ID[]
Returns array of IDs of the elements which are the current targets of the association ariaLabelledBy.
Returns:
sap.ui.core.ID[]
getCancelButtonText(): string

Gets current value of property cancelButtonText.

The text of the cancel button. The default text is "Cancel" (translated to the respective language).

Default value is .

Returns:
stringValue of property cancelButtonText
getCustomIcon(): sap.ui.core.URI

Gets current value of property customIcon.

Icon, used from the BusyIndicator. This icon is invisible in iOS platform and it is density aware. You can use the density convention (@2, @1.5, etc.) to provide higher resolution image for higher density screens.

Default value is .

Returns:
sap.ui.core.URIValue of property customIcon
getCustomIconDensityAware(): boolean

Gets current value of property customIconDensityAware.

If this is set to false, the source image will be loaded directly without attempting to fetch the density perfect image for high density devices. By default, this is set to true but then one or more requests are sent trying to get the density perfect version of the image.

If bandwidth is the key for the application, set this value to false.

Default value is true.

Returns:
booleanValue of property customIconDensityAware
getCustomIconHeight(): sap.ui.core.CSSSize

Gets current value of property customIconHeight.

Height of the provided icon with default value "44px".

Default value is 44px.

Returns:
sap.ui.core.CSSSizeValue of property customIconHeight
getCustomIconRotationSpeed(): int

Gets current value of property customIconRotationSpeed.

Defines the rotation speed of the given image. If GIF file is used, the speed has to be set to 0. The value is in milliseconds.

Default value is 1000.

Returns:
intValue of property customIconRotationSpeed
getCustomIconWidth(): sap.ui.core.CSSSize

Gets current value of property customIconWidth.

Width of the provided icon with default value "44px".

Default value is 44px.

Returns:
sap.ui.core.CSSSizeValue of property customIconWidth
getShowCancelButton(): boolean

Gets current value of property showCancelButton.

Indicates if the cancel button will be rendered inside the busy dialog. The default value is set to false.

Default value is false.

Returns:
booleanValue of property showCancelButton
getText(): string

Gets current value of property text.

Optional text displayed inside the dialog.

Default value is .

Returns:
stringValue of property text
getTitle(): string

Gets current value of property title.

Sets the title of the BusyDialog. The default value is an empty string.

Default value is .

Returns:
stringValue of property title
Opens the BusyDialog.
Returns:
sap.m.BusyDialog
removeAllAriaLabelledBy(): sap.ui.core.ID[]
Removes all the controls in the association named ariaLabelledBy.
Returns:
sap.ui.core.ID[]An array of the removed elements (might be empty)
removeAriaLabelledBy(vAriaLabelledBy): sap.ui.core.ID
Removes an ariaLabelledBy from the association named ariaLabelledBy.
Parameters:
int|sap.ui.core.ID|sap.ui.core.ControlvAriaLabelledByThe ariaLabelledBy to be removed or its index or ID
Returns:
sap.ui.core.IDThe removed ariaLabelledBy or null
setCancelButtonText(sCancelButtonText): sap.m.BusyDialog

Sets a new value for property cancelButtonText.

The text of the cancel button. The default text is "Cancel" (translated to the respective language).

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

Default value is .

Parameters:
stringsCancelButtonTextNew value for property cancelButtonText
Returns:
sap.m.BusyDialogReference to this in order to allow method chaining
setCustomIcon(sCustomIcon): sap.m.BusyDialog

Sets a new value for property customIcon.

Icon, used from the BusyIndicator. This icon is invisible in iOS platform and it is density aware. You can use the density convention (@2, @1.5, etc.) to provide higher resolution image for higher density screens.

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

Default value is .

Parameters:
sap.ui.core.URIsCustomIconNew value for property customIcon
Returns:
sap.m.BusyDialogReference to this in order to allow method chaining
setCustomIconDensityAware(bCustomIconDensityAware): sap.m.BusyDialog

Sets a new value for property customIconDensityAware.

If this is set to false, the source image will be loaded directly without attempting to fetch the density perfect image for high density devices. By default, this is set to true but then one or more requests are sent trying to get the density perfect version of the image.

If bandwidth is the key for the application, set this value to false.

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

Default value is true.

Parameters:
booleanbCustomIconDensityAwareNew value for property customIconDensityAware
Returns:
sap.m.BusyDialogReference to this in order to allow method chaining
setCustomIconHeight(sCustomIconHeight): sap.m.BusyDialog

Sets a new value for property customIconHeight.

Height of the provided icon with default value "44px".

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

Default value is 44px.

Parameters:
sap.ui.core.CSSSizesCustomIconHeightNew value for property customIconHeight
Returns:
sap.m.BusyDialogReference to this in order to allow method chaining
setCustomIconRotationSpeed(iCustomIconRotationSpeed): sap.m.BusyDialog

Sets a new value for property customIconRotationSpeed.

Defines the rotation speed of the given image. If GIF file is used, the speed has to be set to 0. The value is in milliseconds.

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

Default value is 1000.

Parameters:
intiCustomIconRotationSpeedNew value for property customIconRotationSpeed
Returns:
sap.m.BusyDialogReference to this in order to allow method chaining
setCustomIconWidth(sCustomIconWidth): sap.m.BusyDialog

Sets a new value for property customIconWidth.

Width of the provided icon with default value "44px".

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

Default value is 44px.

Parameters:
sap.ui.core.CSSSizesCustomIconWidthNew value for property customIconWidth
Returns:
sap.m.BusyDialogReference to this in order to allow method chaining
setShowCancelButton(bShowCancelButton): sap.m.BusyDialog

Sets a new value for property showCancelButton.

Indicates if the cancel button will be rendered inside the busy dialog. The default value is set to false.

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

Default value is false.

Parameters:
booleanbShowCancelButtonNew value for property showCancelButton
Returns:
sap.m.BusyDialogReference to this in order to allow method chaining
setText(sText): sap.m.BusyDialog

Sets a new value for property text.

Optional text displayed inside the dialog.

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

Default value is .

Parameters:
stringsTextNew value for property text
Returns:
sap.m.BusyDialogReference to this in order to allow method chaining
setTitle(sTitle): sap.m.BusyDialog

Sets a new value for property title.

Sets the title of the BusyDialog. The default value is an empty string.

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

Default value is .

Parameters:
stringsTitleNew value for property title
Returns:
sap.m.BusyDialogReference to this in order to allow method chaining