sap.m.MultiComboBox.extend(sClassName, oClassInfo?, FNMetaImpl?): function
Creates a new subclass of class sap.m.MultiComboBox 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.ComboBoxBase.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.MultiComboBox.
Returns:
Adds some item oItem
to the association named selectedItems
.
Parameters:
Returns:
Adds selected items. Only items with valid keys are added as selected.
Parameters:
{string[]} | aKeys | An array of item keys that identifies the items to be added as selected |
Returns:
Attaches event handler
fnFunction
to the
selectionChange
event of this
sap.m.MultiComboBox
.
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.MultiComboBox
itself.
Event is fired when selection of an item is changed. Note: please do not use the "change" event inherited from sap.m.InputBase
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.MultiComboBox itself |
Returns:
Attaches event handler
fnFunction
to the
selectionFinish
event of this
sap.m.MultiComboBox
.
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.MultiComboBox
itself.
Event is fired when user has finished a selection of items in a list box and list box has been 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.MultiComboBox itself |
Returns:
clearSelection()
Clear the selection.
Creates a picker. To be overwritten by subclasses.
Parameters:
Returns:
Destroys all the items in the aggregation named items
.
Returns:
Detaches event handler
fnFunction
from the
selectionChange
event of this
sap.m.MultiComboBox
.
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
selectionFinish
event of this
sap.m.MultiComboBox
.
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
selectionChange
to attached listeners.
Expects the following event parameters:
changedItem
of type sap.ui.core.Item
Item which selection is changedselected
of type boolean
Selection state: true if item is selected, false if item is not selected
Parameters:
{Map} | mArguments? | The arguments to pass along with the event |
Returns:
Fires event
selectionFinish
to attached listeners.
Expects the following event parameters:
selectedItems
of type sap.ui.core.Item[]
The selected items which are selected after list box has been closed.
Parameters:
{Map} | mArguments? | The arguments to pass along with the event |
Returns:
getAccessibilityInfo()
See:
{sap.ui.core.Control#getAccessibilityInfo} |
Gets the enabled items from the aggregation named items
.
Parameters:
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:
Retrieves the selected item objects from the association named selectedItems
.
Returns:
{sap.ui.core.Item[]} | Array of sap.ui.core.Item instances. The current target of the selectedItems association. |
getSelectedKeys(): string[]
Gets current value of property
selectedKeys
.
Keys of the selected items. If the key has no corresponding item, no changes will apply. If duplicate keys exists the first item matching the key is used.
Default value is []
.
Returns:
{string[]} | Value of property selectedKeys |
Inserts an item into the aggregation named items
.
Parameters:
{sap.ui.core.Item} | oItem | The item to insert; 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:
onAfterRenderingPicker()
This hook method is called after the MultiComboBox's Pop-up is rendered.
onBeforeRenderingPicker()
This hook method is called before the MultiComboBox's Pop-up is rendered.
Removes all the items in the aggregation named items
.
Returns:
{sap.ui.core.Item[]} | An array of sap.ui.core.Item of the removed items (might be empty). |
Removes all the controls in the association named selectedItems
.
Returns:
Removes an item from the aggregation named items
.
Parameters:
Returns:
Removes an selectedItem from the association named selectedItems
.
Parameters:
{int|string|sap.ui.core.Item} | vSelectedItem | The selectedItemto be removed or its index or ID |
Returns:
Removes selected items. Only items with valid keys are removed.
Parameters:
{string[]} | aKeys | An array of item keys that identifies the items to be removed |
Returns:
Setter for association selectedItems
.
Parameters:
{string[]|sap.ui.core.Item[]|null} | aItems | new values for association selectedItems . Array of sap.ui.core.Item Id which becomes the new target of this selectedItems association. Alternatively, an array of sap.ui.core.Item instance may be given or null. |
Returns:
Sets a new value for property
selectedKeys
.
Keys of the selected items. If the key has no corresponding item, no changes will apply. If duplicate keys exists the first item matching the key is used.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is []
.
Parameters:
{string[]} | sSelectedKeys | New value for property selectedKeys |
Returns: