A field help used in the FieldHelp
association of controls based on FieldBase that shows a list of items.
Constructor for a new ListFieldHelp
.
This field help supports only single selection.
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.ui.mdc.field.ListFieldHelp(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 |
---|---|---|---|
filterList | boolean | true | If set, the items of the list are filtered based on If a type-ahead behavior for the connected field is wanted, this property must be set to If not set, the list opens if the user clicks into the connected field. |
useFirstMatch | boolean | false | If set, This is the case if the text of the item starts with the text entered. |
Name | Type | Default Value | Description |
---|---|---|---|
conditions | object[] | The conditions of the selected items. Note: This property must only be set by the control the Note: A condition must have the structure of ConditionObject. Visibility: public |
|
delegate | object | ...see text or source | Defines the module path of the metadata delegate. Visibility: public |
filterValue | string | empty string | The value by which the help is filtered. Note: This only takes effect if the Note: This property must only be set by the control the |
validateInput | boolean | true | If this property is set, the user input is validated against the field help. If no entry is found for the user input, an error occurs. If this property is not set, the user input is still checked against the field help. But if no entry is found, the user input is set to the field if the used data type allows this. (A type parsing error is shown if the user input adheres to the requirements of the used data type.) |
delegate | object | Path to the |
Default Aggregation: items
Name | Cardinality | Type | Description |
---|---|---|---|
items (default) | 0..n | sap.ui.core.ListItem |
Items of the field help. The If the Note: At the moment, icons are not supported. Note: If ListFieldHelpItem elements are used as items, the items are grouped and sorted by the value provided in the |
Method | Description |
---|---|
addItem |
Adds some item to the aggregation items. |
destroyItems |
Destroys all the items in the aggregation items. |
sap.ui.mdc.field.ListFieldHelp.extend |
Creates a new subclass of class sap.ui.mdc.field.ListFieldHelp with name
|
getFilterList |
Gets current value of property filterList. If set, the items of the list are filtered based on If a type-ahead behavior for the connected field is wanted, this property must be set to If not set, the list opens if the user clicks into the connected field. Default value is |
getItems |
Gets content of aggregation items. Items of the field help. The If the Note: At the moment, icons are not supported. Note: If ListFieldHelpItem elements are used as items, the items are grouped and sorted by the value provided in the |
sap.ui.mdc.field.ListFieldHelp.getMetadata |
Returns a metadata object for class sap.ui.mdc.field.ListFieldHelp. |
getUseFirstMatch |
Gets current value of property useFirstMatch. If set, This is the case if the text of the item starts with the text entered. Default value is |
indexOfItem |
Checks for the provided |
insertItem |
Inserts a item into the aggregation items. |
removeAllItems |
Removes all the controls from the aggregation items. Additionally, it unregisters them from the hosting UIArea. |
removeItem |
Removes a item from the aggregation items. |
setFilterList |
Sets a new value for property filterList. If set, the items of the list are filtered based on If a type-ahead behavior for the connected field is wanted, this property must be set to If not set, the list opens if the user clicks into the connected field. When called with a value of Default value is |
setUseFirstMatch |
Sets a new value for property useFirstMatch. If set, This is the case if the text of the item starts with the text entered. When called with a value of Default value is |
Adds some item to the aggregation items.
Param | Type | DefaultValue | Description |
---|---|---|---|
oItem | sap.ui.core.ListItem |
The item to add; if empty, nothing is inserted |
Creates a new subclass of class sap.ui.mdc.field.ListFieldHelp 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.mdc.field.FieldHelpBase.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 |
Gets current value of property filterList.
If set, the items of the list are filtered based on filterValue
.
If a type-ahead behavior for the connected field is wanted, this property must be set to true
. For small lists all values are meant to be shown, independent of the typing in the connected field. In this case this property must be set to false
.
If not set, the list opens if the user clicks into the connected field.
Default value is true
.
Gets content of aggregation items.
Items of the field help.
The key
of the items is not shown in the list, but is used as a value of the connected field.
If the additionalText
for all the items is not used, the column will not be displayed.
Note: At the moment, icons are not supported.
Note: If ListFieldHelpItem elements are used as items, the items are grouped and sorted by the value provided in the groupKey
property of the item. The value provided in the groupText
property will be shown as group header.
Returns a metadata object for class sap.ui.mdc.field.ListFieldHelp.
Gets current value of property useFirstMatch.
If set, getKeyForText
returns the first item that matches the text.
This is the case if the text of the item starts with the text entered.
Default value is false
.
Checks for the provided sap.ui.core.ListItem
in the aggregation items. and returns its index if found or -1 otherwise.
Param | Type | DefaultValue | Description |
---|---|---|---|
oItem | sap.ui.core.ListItem |
The item whose index is looked for |
Inserts a item into the aggregation items.
Param | Type | DefaultValue | Description |
---|---|---|---|
oItem | sap.ui.core.ListItem |
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 a item from the aggregation items.
Param | Type | DefaultValue | Description |
---|---|---|---|
vItem | int string sap.ui.core.ListItem |
The item to remove or its index or id |
Sets a new value for property filterList.
If set, the items of the list are filtered based on filterValue
.
If a type-ahead behavior for the connected field is wanted, this property must be set to true
. For small lists all values are meant to be shown, independent of the typing in the connected field. In this case this property must be set to false
.
If not set, the list opens if the user clicks into the connected 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 |
---|---|---|---|
bFilterList | boolean | true |
New value for property |
Sets a new value for property useFirstMatch.
If set, getKeyForText
returns the first item that matches the text.
This is the case if the text of the item starts with the text entered.
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 |
---|---|---|---|
bUseFirstMatch | boolean | false |
New value for property |