sap.m.ComboBoxBase.extend(sClassName, oClassInfo?, FNMetaImpl?): function
Creates a new subclass of class sap.m.ComboBoxBase 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.ComboBoxTextField.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.ComboBoxBase.
Returns:
Adds an item to the aggregation named items
.
Parameters:
Returns:
Attaches event handler
fnFunction
to the
loadItems
event of this
sap.m.ComboBoxBase
.
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.ComboBoxBase
itself.
This event is fired when the end user moves the cursor to the text field, performs an action that requires items to be loaded, and items are not already loaded. For example, pressing F4 to open the dropdown list or typing something in the text field fires the event.
Note: We strongly recommend to only use this feature in performance critical scenarios. Loading the items lazily (on demand) to defer initialization has several implications for the end user experience. For example, the busy indicator has to be shown while the items are being loaded and assistive technology software also has to announce the state changes (which may be confusing for some screen reader users).
Note: Currently the sap.m.MultiComboBox
does not support 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.m.ComboBoxBase itself |
- Since:
- 1.38
Returns:
Parameters:
{object} | oBindingInfo | The binding information |
Returns:
clearSelection()
Clears the selection. To be overwritten by subclasses.
Closes the control's picker popup.
Returns:
Creates a picker popup container where the selection should take place. To be overwritten by subclasses.
Parameters:
Returns:
Destroys all the items in the aggregation named items
.
Returns:
Detaches event handler
fnFunction
from the
loadItems
event of this
sap.m.ComboBoxBase
.
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.38
Returns:
Fires event loadItems
to attached listeners.
Parameters:
{Map} | mArguments? | The arguments to pass along with the event |
- Since:
- 1.38
Returns:
Gets the enabled items from the aggregation named items
.
Parameters:
Returns:
Gets the first item from the aggregation named items
.
Returns:
Gets the item from the aggregation named items
at the given 0-based index.
Parameters:
{int} | iIndex | Index of the item to return. |
Returns:
Gets the item with the given key from the aggregation named
items
.
Note: If duplicate keys exist, the first item matching the key is returned.
Parameters:
{string} | sKey | An item key that specifies the item to retrieve. |
Returns:
Gets content of aggregation
items
.
Defines the items contained within this control.
Returns:
Gets the last item from the aggregation named items
.
Returns:
Gets the control's picker popup.
Returns:
getPickerType(): string
Gets the property _sPickerType
Returns:
indexOfItem(oItem): int
Checks for the provided sap.ui.core.Item
in the aggregation items
. 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 an item into the aggregation named items
.
Parameters:
{sap.ui.core.Item} | oItem | The item to be inserted; if empty, nothing is inserted. |
{int} | iIndex | 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. |
Returns:
isOpen(): boolean
Indicates whether the control's picker popup is open.
Returns:
{boolean} | Determines whether the control's picker popup is currently open (this includes opening and closing animations). |
Opens the control's picker popup.
Returns:
Removes all the controls in the aggregation named items
. Additionally unregisters them from the hosting UIArea and clears the selection.
Returns:
Removes an item from the aggregation named items
.
Parameters:
Returns:
setPickerType(sPickerType)
Sets the property _sPickerType
.
Parameters:
Unbinds aggregation items
from model data.
Returns: