sap.ui.commons.ComboBox.extend(sClassName, oClassInfo?, FNMetaImpl?): function
Creates a new subclass of class sap.ui.commons.ComboBox 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.commons.TextField.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.commons.ComboBox.
Returns:
_checkChange(oEvent, bImmediate?)
Compares the previous value with the current value and fires the "Change" event if the ComboBox is editable and the value has changed or whether the value has been changed e.g. via up/down or auto-complete feature
Parameters:
{jQuery.Event} | oEvent | The event object. |
{boolean} | bImmediate? | indicate whether the check should happen immediately or delayed (e.g. to avoid focusout / click double event processing) |
Adds some item to the aggregation items
.
Parameters:
Returns:
Parameters:
{object} | oBindingInfo | The binding information |
Returns:
Destroys all the items in the aggregation items
.
Returns:
Fire event change to attached listeners.
Expects following event parameters:
- 'newValue' of type
string
The new / changed value of the textfield. - 'selectedItem' of type
sap.ui.core.ListItem
selected item
Parameters:
{Map} | mArguments? | the arguments to pass along with the event. |
Returns:
getAccessibilityInfo()
See:
{sap.ui.core.Control#getAccessibilityInfo} |
getDisplaySecondaryValues(): boolean
Gets current value of property
displaySecondaryValues
.
Indicates whether the additionalText
property that is available for sap.ui.core.ListItem
shall be displayed in the list.
Default value is false
.
Returns:
{boolean} | Value of property displaySecondaryValues |
getF4ButtonDomRef(): Element
Returns the DomRef which represents the icon for value help. Could be overwritten in child-classes
Returns:
{Element} | The F4-element's DOM reference or null |
Gets content of aggregation
items
.
ListItems
(see sap.ui.core.ListBox
) that shall be displayed in the list.
Returns:
ID of the element which is the current target of the association listBox
, or null
.
Returns:
getMaxPopupItems(): int
Gets current value of property
maxPopupItems
.
Defines the number of items that shall be displayed at once. If the overall number of items is higher than this setting, a scrollbar is provided.
Default value is 10
.
Returns:
{int} | Value of property maxPopupItems |
getSelectedItemId(): string
Gets current value of property
selectedItemId
.
Id of the selected item. If the value has no corresponding item, the selectedItemId
is empty.
If the selectedItemId
is set to an not existing item, it will not be changed.
Returns:
{string} | Value of property selectedItemId |
getSelectedKey(): string
Gets current value of property
selectedKey
.
Key of the selected item.
If the value has no corresponding item the key is empty.
If duplicate keys exists the first item matching the key is used.
If the key is set to a not existing value it will not be changed.
Returns:
{string} | Value of property selectedKey |
indexOfItem(oItem): int
Checks for the provided sap.ui.core.ListItem
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 a item into the aggregation items
.
Parameters:
{sap.ui.core.ListItem} | 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:
onsapenter(oEvent)
Handle sapenter pseudo events on the control
Parameters:
onsapescape(oEvent)
Handle sapescape pseudo events on the control
Parameters:
onsaphide(oEvent)
Handle saphide pseudo events on the control
Parameters:
onsapnextmodifiers(oEvent)
Handle sapnextmodifiers pseudo events on the control if in toolbar prevent item navigation if popup is opened.
Parameters:
onsapshow(oEvent)
Handle sapshow pseudo events on the control
Parameters:
Removes all the controls from the aggregation
items
.
Additionally, it unregisters them from the hosting UIArea.
Returns:
Removes a item from the aggregation items
.
Parameters:
Returns:
Sets a new value for property
displaySecondaryValues
.
Indicates whether the additionalText
property that is available for sap.ui.core.ListItem
shall be displayed in the list.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is false
.
Parameters:
{boolean} | bDisplaySecondaryValues | New value for property displaySecondaryValues |
Returns:
Sets the associated listBox
.
Parameters:
{sap.ui.commons.ListBox} | oListBox | Id of an element which becomes the new target of this listBox association; alternatively, an element instance may be given |
Returns:
Sets a new value for property
maxPopupItems
.
Defines the number of items that shall be displayed at once. If the overall number of items is higher than this setting, a scrollbar is provided.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is 10
.
Parameters:
{int} | iMaxPopupItems | New value for property maxPopupItems |
Returns:
Sets a new value for property
selectedItemId
.
Id of the selected item. If the value has no corresponding item, the selectedItemId
is empty.
If the selectedItemId
is set to an not existing item, it will not be changed.
When called with a value of null
or undefined
, the default value of the property will be restored.
Parameters:
{string} | sSelectedItemId | New value for property selectedItemId |
Returns:
Sets a new value for property
selectedKey
.
Key of the selected item.
If the value has no corresponding item the key is empty.
If duplicate keys exists the first item matching the key is used.
If the key is set to a not existing value it will not be changed.
When called with a value of null
or undefined
, the default value of the property will be restored.
Parameters:
{string} | sSelectedKey | New value for property selectedKey |
Returns:
Unbinds aggregation items
from model data.
Returns: