This control allows you to add items to a sap.m.Select instance. In addition, based on the property set, a set of pre-filled entries is added.
Constructor for MultiEditField
Accepts an object literal mSettings
that defines initial property values, aggregated and associated objects as well as event handlers. See sap.ui.base.ManagedObject#constructor for a general description of the syntax of the settings object.
new sap.m.MultiEditField(sId?, mSettings?)
Param | Type | Default Value | Description |
---|---|---|---|
sId? | string | id for the new control, generated automatically if no id is given |
|
mSettings? | object | initial settings for the new control |
Name | Type | Default Value | Description |
---|---|---|---|
nullable | boolean | true | Defines whether the 'Leave blank' item should be available in the selection field. Visibility: public |
required | boolean | false | Defines whether the 'Label' is required for the selection field. Visibility: public |
selectedItem | sap.ui.core.Item | The selected item from |
|
showValueHelp | boolean | true | Defines whether the 'Select new value' item should be available in the selection field. Please note that upon selecting this item, the previously selected item is restored. As a consequence, the |
Default Aggregation:
Name | Cardinality | Type | Description |
---|---|---|---|
items | 0..n | sap.ui.core.Item |
The items that should be displayed after the predefined special items in the selection field. |
Name | Cardinality | Type | Description |
---|---|---|---|
ariaLabelledBy | 0..n | sap.ui.core.Control |
The label that should be displayed before the field. |
Event | Description |
---|---|
change |
This event is fired when the item of items aggregation in the selection field is changed. |
Method | Description |
---|---|
addAriaLabelledBy |
Adds some ariaLabelledBy into the association ariaLabelledBy. |
addItem |
Adds some item to the aggregation items. |
attachChange |
Attaches event handler When called, the context of the event handler (its This event is fired when the item of items aggregation in the selection field is changed. |
bindItems |
Binds aggregation items to model data. See ManagedObject.bindAggregation for a detailed description of the possible properties of |
destroyItems |
Destroys all the items in the aggregation items. |
detachChange |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
sap.m.MultiEditField.extend |
Creates a new subclass of class sap.m.MultiEditField with name
|
fireChange |
Fires event change to attached listeners. |
getAriaLabelledBy |
Returns array of IDs of the elements which are the current targets of the association ariaLabelledBy. |
getFormDoNotAdjustWidth |
The field is not adjusted by the Form control to meet the cell's width |
getItems |
Gets content of aggregation items. The items that should be displayed after the predefined special items in the selection field. |
sap.m.MultiEditField.getMetadata |
Returns a metadata object for class sap.m.MultiEditField. |
getNullable |
Gets current value of property nullable. Defines whether the 'Leave blank' item should be available in the selection field. Default value is |
getRequired |
Gets current value of property required. Defines whether the 'Label' is required for the selection field. Default value is |
getSelectedItem |
Gets current value of property selectedItem. The selected item from |
getShowValueHelp |
Gets current value of property showValueHelp. Defines whether the 'Select new value' item should be available in the selection field. Please note that upon selecting this item, the previously selected item is restored. As a consequence, the Default value is |
indexOfItem |
Checks for the provided |
insertItem |
Inserts a item into the aggregation items. |
isBlankSelected |
Checks if the 'Leave blank' item is selected. |
isKeepExistingSelected |
Checks if the 'Keep existing value' item is selected. |
removeAllAriaLabelledBy |
Removes all the controls in the association named ariaLabelledBy. |
removeAllItems |
Removes all the controls from the aggregation items. Additionally, it unregisters them from the hosting UIArea. |
removeAriaLabelledBy |
Removes an ariaLabelledBy from the association named ariaLabelledBy. |
removeItem |
Removes a item from the aggregation items. |
resetSelection |
Sets the previously selected item as the currently selected item of the internal select control. |
setNullable |
Sets a new value for property nullable. Defines whether the 'Leave blank' item should be available in the selection field. When called with a value of Default value is |
setRequired |
Sets a new value for property required. Defines whether the 'Label' is required for the selection field. When called with a value of Default value is |
setSelectedItem |
Sets a new value for property selectedItem. The selected item from When called with a value of |
setShowValueHelp |
Sets a new value for property showValueHelp. Defines whether the 'Select new value' item should be available in the selection field. Please note that upon selecting this item, the previously selected item is restored. As a consequence, the When called with a value of Default value is |
unbindItems |
Unbinds aggregation items from model data. |
Adds some ariaLabelledBy into the association ariaLabelledBy.
Param | Type | DefaultValue | Description |
---|---|---|---|
vAriaLabelledBy | sap.ui.core.ID sap.ui.core.Control |
The ariaLabelledBy to add; if empty, nothing is inserted |
Adds some item to the aggregation items.
Param | Type | DefaultValue | Description |
---|---|---|---|
oItem | sap.ui.core.Item |
The item to add; if empty, nothing is inserted |
Attaches event handler fnFunction
to the change event of this sap.m.MultiEditField
.
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.MultiEditField
itself.
This event is fired when the item of items aggregation in the selection field is changed.
Param | Type | DefaultValue | Description |
---|---|---|---|
oData | object |
An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called when the event occurs |
|
oListener | object |
Context object to call the event handler with. Defaults to this |
Binds aggregation items to model data.
See ManagedObject.bindAggregation for a detailed description of the possible properties of oBindingInfo
.
Param | Type | DefaultValue | Description |
---|---|---|---|
oBindingInfo | sap.ui.base.ManagedObject.AggregationBindingInfo |
The binding information |
Detaches event handler fnFunction
from the change event of this sap.m.MultiEditField
.
The passed function and listener object must match the ones used for event registration.
Param | Type | DefaultValue | Description |
---|---|---|---|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called, when the event occurs |
|
oListener | object |
Context object on which the given function had to be called |
Creates a new subclass of class sap.m.MultiEditField 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.XMLComposite.extend.
Param | Type | DefaultValue | Description |
---|---|---|---|
sClassName | string |
Name of the class being created |
|
oClassInfo | object |
Object literal with information about the class |
|
FNMetaImpl | function |
Constructor function for the metadata object; if not given, it defaults to the metadata implementation used by this class |
Fires event change to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
|
selectedItem | sap.ui.core.Item |
The selected item. |
Returns array of IDs of the elements which are the current targets of the association ariaLabelledBy.
Gets content of aggregation items.
The items that should be displayed after the predefined special items in the selection field.
Gets current value of property nullable.
Defines whether the 'Leave blank' item should be available in the selection field.
Default value is true
.
Gets current value of property required.
Defines whether the 'Label' is required for the selection field.
Default value is false
.
Gets current value of property selectedItem.
The selected item from items
aggregation. This can be null
if no valid item or special item is selected.
Gets current value of property showValueHelp.
Defines whether the 'Select new value' item should be available in the selection field. Please note that upon selecting this item, the previously selected item is restored. As a consequence, the selectedItem
property never contains this item.
Default value is true
.
Checks for the provided sap.ui.core.Item
in the aggregation items. and returns its index if found or -1 otherwise.
Param | Type | DefaultValue | Description |
---|---|---|---|
oItem | sap.ui.core.Item |
The item whose index is looked for |
Inserts a item into the aggregation items.
Param | Type | DefaultValue | Description |
---|---|---|---|
oItem | sap.ui.core.Item |
The item to insert; if empty, nothing is inserted |
|
iIndex | int |
The |
Removes all the controls from the aggregation items.
Additionally, it unregisters them from the hosting UIArea.
Removes an ariaLabelledBy from the association named ariaLabelledBy.
Param | Type | DefaultValue | Description |
---|---|---|---|
vAriaLabelledBy | int sap.ui.core.ID sap.ui.core.Control |
The ariaLabelledBy to be removed or its index or ID |
Removes a item from the aggregation items.
Param | Type | DefaultValue | Description |
---|---|---|---|
vItem | int string sap.ui.core.Item |
The item to remove or its index or id |
Sets the previously selected item as the currently selected item of the internal select control.
Sets a new value for property nullable.
Defines whether the 'Leave blank' item should be available in the selection field.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is true
.
Param | Type | DefaultValue | Description |
---|---|---|---|
bNullable | boolean | true |
New value for property |
Sets a new value for property required.
Defines whether the 'Label' is required for the selection field.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is false
.
Param | Type | DefaultValue | Description |
---|---|---|---|
bRequired | boolean | false |
New value for property |
Sets a new value for property selectedItem.
The selected item from items
aggregation. This can be null
if no valid item or special item is selected.
When called with a value of null
or undefined
, the default value of the property will be restored.
Param | Type | DefaultValue | Description |
---|---|---|---|
sSelectedItem | sap.ui.core.Item |
New value for property |
Sets a new value for property showValueHelp.
Defines whether the 'Select new value' item should be available in the selection field. Please note that upon selecting this item, the previously selected item is restored. As a consequence, the selectedItem
property never contains this item.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is true
.
Param | Type | DefaultValue | Description |
---|---|---|---|
bShowValueHelp | boolean | true |
New value for property |