sap.m.ActionSheet.extend(sClassName, oClassInfo?, FNMetaImpl?): function
Creates a new subclass of class sap.m.ActionSheet 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.m.ActionSheet.
Returns:
Adds some button to the aggregation buttons.
Parameters:
| {sap.m.Button} | oButton | the button to add; if empty, nothing is inserted |
Returns:
Attaches event handler
fnFunction to the
afterClose event of this
sap.m.ActionSheet.
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.ActionSheet itself.
This event will be fired after the ActionSheet 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.ActionSheet itself |
Returns:
Attaches event handler
fnFunction to the
afterOpen event of this
sap.m.ActionSheet.
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.ActionSheet itself.
This event will be fired after the ActionSheet is opened.
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.ActionSheet itself |
Returns:
Attaches event handler
fnFunction to the
beforeClose event of this
sap.m.ActionSheet.
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.ActionSheet itself.
This event will be fired before the ActionSheet 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.ActionSheet itself |
Returns:
Attaches event handler
fnFunction to the
beforeOpen event of this
sap.m.ActionSheet.
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.ActionSheet itself.
This event will be fired before the ActionSheet is opened.
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.ActionSheet itself |
Returns:
Attaches event handler
fnFunction to the
cancelButtonPress event of this
sap.m.ActionSheet.
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.ActionSheet itself.
This event is fired when the cancelButton is clicked. For iPad, this event is also fired when showCancelButton is set to true, and Popover is closed by clicking outside.
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.ActionSheet itself |
Returns:
close(): void
Calling this method will make the ActionSheet disappear from the screen.
Destroys all the buttons in the aggregation buttons.
Returns:
Detaches event handler
fnFunction from the
afterClose event of this
sap.m.ActionSheet.
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
afterOpen event of this
sap.m.ActionSheet.
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
beforeClose event of this
sap.m.ActionSheet.
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
beforeOpen event of this
sap.m.ActionSheet.
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
cancelButtonPress event of this
sap.m.ActionSheet.
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:
Fires event afterClose to attached listeners.
Parameters:
| {Map} | mArguments? | The arguments to pass along with the event |
Returns:
Fires event afterOpen to attached listeners.
Parameters:
| {Map} | mArguments? | The arguments to pass along with the event |
Returns:
Fires event beforeClose to attached listeners.
Parameters:
| {Map} | mArguments? | The arguments to pass along with the event |
Returns:
Fires event beforeOpen to attached listeners.
Parameters:
| {Map} | mArguments? | The arguments to pass along with the event |
Returns:
Fires event cancelButtonPress to attached listeners.
Parameters:
| {Map} | mArguments? | The arguments to pass along with the event |
Returns:
Gets content of aggregation
buttons.
These buttons are added to the content area in ActionSheet control. When button is tapped, the ActionSheet is closed before the tap event listener is called.
Returns:
getCancelButtonText(): string
Gets current value of property
cancelButtonText.
This is the text displayed in the cancelButton. Default value is "Cancel", and it's translated according to the current locale setting. This property will be ignored when running either in iPad or showCancelButton is set to false.
Returns:
| {string} | Value of property cancelButtonText |
Gets current value of property
placement.
The ActionSheet behaves as a sap.m.Popover in iPad and this property is the information about on which side will the popover be placed at. Possible values are sap.m.PlacementType.Left, sap.m.PlacementType.Right, sap.m.PlacementType.Top, sap.m.PlacementType.Bottom, sap.m.PlacementType.Horizontal, sap.m.PlacementType.HorizontalPreferedLeft, sap.m.PlacementType.HorizontalPreferedRight, sap.m.PlacementType.Vertical, sap.m.PlacementType.VerticalPreferedTop, sap.m.PlacementType.VerticalPreferedBottom. The default value is sap.m.PlacementType.Bottom.
Default value is Bottom.
Returns:
getShowCancelButton(): boolean
Gets current value of property
showCancelButton.
If this is set to true, there will be a cancel button shown below the action buttons. There won't be any cancel button shown in iPad regardless of this property. The default value is set to true.
Default value is true.
Returns:
| {boolean} | Value of property showCancelButton |
getTitle(): string
Gets current value of property
title.
Title will be shown in the header area in iPhone and every Android devices. This property will be ignored in tablets and desktop browser.
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:
Returns:
| {int} | The index of the provided control in the aggregation if found, or -1 otherwise |
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:
isOpen(): boolean
The method checks if the ActionSheet is open. It returns true when the ActionSheet is currently open (this includes opening and closing animations), otherwise it returns false.
Returns:
openBy(oControl): void
Calling this method will make the ActionSheet visible on the screen.
Parameters:
| {object} | oControl | The ActionSheet behaves as a sap.m.Popover in iPad and the control parameter is the object to which the popover will be placed. It can be not only a UI5 control, but also an existing dom reference. The side of the placement depends on the placement property set in the popover. In other platforms, ActionSheet behaves as a standard dialog and this parameter is ignored because dialog is aligned to the screen. |
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) |
Removes a button from the aggregation buttons.
Parameters:
| {int|string|sap.m.Button} | vButton | The buttonto remove or its index or id |
Returns:
Sets a new value for property
cancelButtonText.
This is the text displayed in the cancelButton. Default value is "Cancel", and it's translated according to the current locale setting. This property will be ignored when running either in iPad or showCancelButton is set to false.
When called with a value of null or undefined, the default value of the property will be restored.
Parameters:
| {string} | sCancelButtonText | New value for property cancelButtonText |
Returns:
Sets a new value for property
placement.
The ActionSheet behaves as a sap.m.Popover in iPad and this property is the information about on which side will the popover be placed at. Possible values are sap.m.PlacementType.Left, sap.m.PlacementType.Right, sap.m.PlacementType.Top, sap.m.PlacementType.Bottom, sap.m.PlacementType.Horizontal, sap.m.PlacementType.HorizontalPreferedLeft, sap.m.PlacementType.HorizontalPreferedRight, sap.m.PlacementType.Vertical, sap.m.PlacementType.VerticalPreferedTop, sap.m.PlacementType.VerticalPreferedBottom. The default value is sap.m.PlacementType.Bottom.
When called with a value of null or undefined, the default value of the property will be restored.
Default value is Bottom.
Parameters:
Returns:
Sets a new value for property
showCancelButton.
If this is set to true, there will be a cancel button shown below the action buttons. There won't be any cancel button shown in iPad regardless of this property. The default value is set to true.
When called with a value of null or undefined, the default value of the property will be restored.
Default value is true.
Parameters:
| {boolean} | bShowCancelButton | New value for property showCancelButton |
Returns:
Sets a new value for property
title.
Title will be shown in the header area in iPhone and every Android devices. This property will be ignored in tablets and desktop browser.
When called with a value of null or undefined, the default value of the property will be restored.
Parameters:
| {string} | sTitle | New value for property title |
Returns:
Attaches event handler
fnFunction to the
cancelButtonTap event of this
sap.m.ActionSheet.
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.ActionSheet itself.
This event is fired when the cancelButton is tapped. For iPad, this event is also fired when showCancelButton is set to true, and Popover is closed by tapping outside.
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.ActionSheet itself |
- Deprecated:
- Since version 1.20.0. This event is deprecated, use the cancelButtonPress event instead.
Returns:
Detaches event handler
fnFunction from the
cancelButtonTap event of this
sap.m.ActionSheet.
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 |
- Deprecated:
- Since version 1.20.0. This event is deprecated, use the cancelButtonPress event instead.
Returns:
Fires event cancelButtonTap to attached listeners.
Parameters:
| {Map} | mArguments? | The arguments to pass along with the event |
- Deprecated:
- Since version 1.20.0. This event is deprecated, use the cancelButtonPress event instead.
Returns: