Allows the user to enter and edit text or numeric values in one line.
You can enable the autocomplete suggestion feature and the value help option to easily enter a valid value.
placeholder
property as a label.description
property only for small fields with no placeholders (i.e. for currencies).The controls inherits from sap.m.InputBase which controls the core properties like:
showValueHelp
) or autocomplete (showSuggestion
). Value help will open a new dialog where you can refine your input. Autocomplete has three types of suggestions: sap.ui.core.Item
or sap.ui.core.ListItem
sap.ui.core.Item
or sap.ui.core.ListItem
sap.m.ColumnListItem
suggestionItems
(for single and double values) and suggestionRows
(for tabular values).When to use: Use the control for short inputs like emails, phones, passwords, fields for assisted value selection.
When not to use: Don't use the control for long texts, dates, designated search fields, fields for multiple selection.
If showValueHelp
or if showSuggestion
is true
, the native browser autofill will not fire a change event.
The control has the following behavior regarding the selectedKey
and value
properties:
selectedKey
set which corresponds to a matching item, and a set value
, the value
will be updated to the matching item's text. selectedKey
is set and the user types an input which corresponds to an item's text, the selectedKey
will be updated with the matching item's key. selectedKey
is set and the user types an input which does not correspond to any item's text, the selectedKey
will be set to an empty string ("") selectedKey
is set and the user selects an item, the selectedKey
will be updated to match the selected item's key. selectedKey
is bound and the user types before the data is loaded, the user's input will be overwritten by the binding update. Constructor for a new Input
.
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.Input(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 |
---|---|---|---|
autocomplete | boolean | true | Specifies whether autocomplete is enabled. Works only if "showSuggestion" property is set to true. Note: The autocomplete feature is disabled on Android devices due to a OS specific issue. |
dateFormat | string | YYYY-MM-dd | Only used if type=date and no datepicker is available. The data is displayed and the user input is parsed according to this format. Note: The value property is always of the form RFC 3339 (YYYY-MM-dd). Visibility: public |
description | string | The description is a text after the input field, e.g. units of measurement, currencies. Visibility: public |
|
effectiveShowClearIcon | boolean | false | Specifies whether the clear icon should be shown/hidden on user interaction. Visibility: hidden |
enableSuggestionsHighlighting | boolean | true | Specifies whether the suggestions highlighting is enabled. |
enableTableAutoPopinMode | boolean | false | Enables the |
fieldWidth | sap.ui.core.CSSSize | 50% | This property only takes effect if the description property is set. It controls the distribution of space between the input field and the description text. The default value is 50% leaving the other 50% for the description. Visibility: public |
filterSuggests | boolean | true | Defines whether to filter the provided suggestions before showing them to the user. Visibility: public |
maxLength | int | 0 | Maximum number of characters. Value '0' means the feature is switched off. This parameter is not compatible with the input type |
maxSuggestionWidth | sap.ui.core.CSSSize | If set, the value of this parameter will control the horizontal size of the suggestion list to display more data. This allows suggestion lists to be wider than the input field if there is enough space available. By default, the suggestion list is always as wide as the input field. Note: The value will be ignored if the actual width of the input field is larger than the specified parameter value. |
|
selectedKey | string | empty string | Defines the key of the selected item. Note: If duplicate keys exist, the first item matching the key is used. |
showClearIcon | boolean | false | Specifies whether clear icon is shown. Pressing the icon will clear input's value and fire the change and liveChange events. |
showSuggestion | boolean | false | If this is set to true, suggest event is fired when user types in the input. Changing the suggestItems aggregation in suggest event listener will show suggestions within a popup. When runs on phone, input will first open a dialog where the input and suggestions are shown. When runs on a tablet, the suggestions are shown in a popup next to the input. |
showTableSuggestionValueHelp | boolean | true | For tabular suggestions, this flag will show/hide the button at the end of the suggestion table that triggers the event "valueHelpRequest" when pressed. The default value is true. Note: If suggestions are not tabular or no suggestions are used, the button will not be displayed and this flag is without effect. |
showValueHelp | boolean | false | If set to true, a value help indicator will be displayed inside the control. When clicked the event "valueHelpRequest" will be fired. |
startSuggestion | int | 1 | Minimum length of the entered text in input before suggest event is fired. The default value is 1 which means the suggest event is fired after user types in input. Note: When it's set to 0, suggest event is fired when input with no text gets focus. In this case no suggestion popup will open. |
suggestionRowValidator | any | empty string | Defines the validation callback function called when a suggestion row gets selected. |
textFormatMode | sap.m.InputTextFormatMode | Value | Defines the display text format mode. |
textFormatter | any | empty string | Defines the display text formatter function. |
type | sap.m.InputType | Text | HTML type of the internal |
valueHelpIconSrc | sap.ui.core.URI | sap-icon://value-help | Set custom value help icon. |
valueHelpOnly | boolean | false | If set to true, direct text input is disabled and the control will trigger the event "valueHelpRequest" for all user interactions. The properties "showValueHelp", "editable", and "enabled" must be set to true, otherwise the property will have no effect |
valueLiveUpdate | boolean | false | Indicates when the value gets updated with the user changes: At each keystroke (true) or first when the user presses enter or tabs out (false). Note: When set to true and the value of the Input control is bound to a model, the change event becomes obsolete and will not be fired, as the value in the model will be updated each time the user provides input. In such cases, subscription to the liveChange event is more appropriate, as it corresponds to the way the underlying model gets updated. |
Name | Type | Default Value | Description |
---|---|---|---|
editable | boolean | true | Defines whether the control can be modified by the user or not. Note: A user can tab to non-editable control, highlight it, and copy the text from it. |
enabled | boolean | true | Indicates whether the user can interact with the control or not. Note: Disabled controls cannot be focused and they are out of the tab-chain. Visibility: public |
name | string | The name to be used in the HTML code (for example, for HTML forms that send data to the server via submission). Visibility: public |
|
placeholder | string | Defines a short hint intended to aid the user with data entry when the control has no value. Visibility: public |
|
required | boolean | false | Indicates that user input is required. This property is only needed for accessibility purposes when a single relationship between the field and a label (see aggregation |
showValueStateMessage | boolean | true | Indicates whether the value state message should be shown or not. |
textAlign | sap.ui.core.TextAlign | Initial | Defines the horizontal alignment of the text that is shown inside the input field. |
textDirection | sap.ui.core.TextDirection | Inherit | Defines the text directionality of the input field, e.g. |
value | string | Defines the value of the control. Visibility: public |
|
valueState | sap.ui.core.ValueState | None | Visualizes the validation state of the control, e.g. |
valueStateText | string | Defines the text that appears in the value state message pop-up. If this is not specified, a default text is shown from the resource bundle. |
|
width | sap.ui.core.CSSSize | Defines the width of the control. Note: If the provided width is too small, the control gets stretched to its min width, which is needed in order for the control to be usable and well aligned. Visibility: public |
Default Aggregation: suggestionItems
Name | Cardinality | Type | Description |
---|---|---|---|
_suggestionPopup | 0..1 | sap.ui.core.Control |
The suggestion popup (can be a Dialog or Popover); aggregation needed to also propagate the model and bindings to the content of the popover |
_valueHelpIcon | 0..1 | sap.ui.core.Icon |
The icon on the right side of the Input |
suggestionColumns | 0..n | sap.m.Column |
The suggestionColumns and suggestionRows are for tabular input suggestions. This aggregation allows for binding the table columns; for more details see the aggregation "suggestionRows". |
suggestionItems (default) | 0..n | sap.ui.core.Item |
Defines the items displayed in the suggestion popup. Changing this aggregation (by calling To display suggestions with two text values, add Note: Only Note: Disabled items are not visualized in the list with the suggestions, however they can still be accessed through the aggregation. Note: If |
suggestionRows | 0..n | sap.m.ColumnListItem |
The suggestionColumns and suggestionRows are for tabular input suggestions. This aggregation allows for binding the table cells. The items of this aggregation are to be bound directly or to set in the suggest event method. Note: If |
Name | Cardinality | Type | Description |
---|---|---|---|
formattedValueStateText | 0..1 | sap.m.FormattedText |
Defines the formatted text that appears in the value state message pop-up. It can include links. If both |
Name | Cardinality | Type | Description |
---|---|---|---|
selectedItem | 0..1 | sap.ui.core.Item |
Sets or retrieves the selected item from the suggestionItems. |
selectedRow | 0..1 | sap.m.ColumnListItem |
Sets or retrieves the selected row from the suggestionRows. |
Event | Description |
---|---|
liveChange |
Fired when the value of the input is changed by user interaction - each keystroke, delete, paste, etc. Note: Browsing autocomplete suggestions does not fires the event. |
submit |
This event is fired when user presses the Enter key on the input. Notes:
Since: 1.33.0. |
suggest |
This event is fired when user types in the input and showSuggestion is set to true. Changing the suggestItems aggregation will show the suggestions within a popup. |
suggestionItemSelected |
This event is fired when suggestionItem shown in suggestion popup are selected. This event is only fired when showSuggestion is set to true and there are suggestionItems shown in the suggestion popup. |
valueHelpRequest |
When the value help indicator is clicked, this event will be fired. |
Fired when the value of the input is changed by user interaction - each keystroke, delete, paste, etc.
Note: Browsing autocomplete suggestions does not fires the event.
Param | Type | Description |
---|---|---|
oControlEvent | sap.ui.base.Event | |
getSource | sap.ui.base.EventProvider | |
getParameters | object | |
value | string |
The current value of the input, after a live change event. |
escPressed | boolean |
Indicates that ESC key triggered the event. Note: This parameter will not be sent unless the ESC key is pressed. |
previousValue | string |
The value of the input before pressing ESC key. Note: This parameter will not be sent unless the ESC key is pressed. |
This event is fired when user presses the Enter key on the input.
Notes:
editable
, enabled
and not valueHelpOnly
).Param | Type | Description |
---|---|---|
oControlEvent | sap.ui.base.Event | |
getSource | sap.ui.base.EventProvider | |
getParameters | object | |
value | string |
The new value of the input. |
This event is fired when user types in the input and showSuggestion is set to true. Changing the suggestItems aggregation will show the suggestions within a popup.
Since: 1.16.1.
Param | Type | Description |
---|---|---|
oControlEvent | sap.ui.base.Event | |
getSource | sap.ui.base.EventProvider | |
getParameters | object | |
suggestValue | string |
The current value which has been typed in the input. |
suggestionColumns | sap.m.ListBase |
The suggestion list is passed to this event for convenience. If you use list-based or tabular suggestions, fill the suggestionList with the items you want to suggest. Otherwise, directly add the suggestions to the "suggestionItems" aggregation of the input control. |
This event is fired when suggestionItem shown in suggestion popup are selected. This event is only fired when showSuggestion is set to true and there are suggestionItems shown in the suggestion popup.
Since: 1.16.3.
Param | Type | Description |
---|---|---|
oControlEvent | sap.ui.base.Event | |
getSource | sap.ui.base.EventProvider | |
getParameters | object | |
selectedItem | sap.ui.core.Item |
This is the item selected in the suggestion popup for one and two-value suggestions. For tabular suggestions, this value will not be set. |
selectedRow | sap.m.ColumnListItem |
This is the row selected in the tabular suggestion popup represented as a ColumnListItem. For one and two-value suggestions, this value will not be set. Note: The row result function to select a result value for the string is already executed at this time. To pick different value for the input field or to do follow up steps after the item has been selected. |
When the value help indicator is clicked, this event will be fired.
Since: 1.16.
Param | Type | Description |
---|---|---|
oControlEvent | sap.ui.base.Event | |
getSource | sap.ui.base.EventProvider | |
getParameters | object | |
fromSuggestions | boolean |
The event parameter is set to true, when the button at the end of the suggestion table is clicked, otherwise false. It can be used to determine whether the "value help" trigger or the "show all items" trigger has been pressed. |
Method | Description |
---|---|
_decoratePopupInput |
Modifies Dialog's Input instance |
addSuggestionColumn |
Adds some suggestionColumn to the aggregation suggestionColumns. |
addSuggestionItem |
Adds suggestion item. |
addSuggestionRow |
Adds some suggestionRow to the aggregation suggestionRows. |
attachLiveChange |
Attaches event handler When called, the context of the event handler (its Fired when the value of the input is changed by user interaction - each keystroke, delete, paste, etc. Note: Browsing autocomplete suggestions does not fires the event. |
attachSubmit |
Attaches event handler When called, the context of the event handler (its This event is fired when user presses the Enter key on the input. Notes:
|
attachSuggest |
Attaches event handler When called, the context of the event handler (its This event is fired when user types in the input and showSuggestion is set to true. Changing the suggestItems aggregation will show the suggestions within a popup. |
attachSuggestionItemSelected |
Attaches event handler When called, the context of the event handler (its This event is fired when suggestionItem shown in suggestion popup are selected. This event is only fired when showSuggestion is set to true and there are suggestionItems shown in the suggestion popup. |
attachValueHelpRequest |
Attaches event handler When called, the context of the event handler (its When the value help indicator is clicked, this event will be fired. |
bindSuggestionColumns |
Binds aggregation suggestionColumns to model data. See ManagedObject.bindAggregation for a detailed description of the possible properties of |
bindSuggestionRows |
Binds aggregation suggestionRows to model data. See ManagedObject.bindAggregation for a detailed description of the possible properties of |
cancelPendingSuggest |
Cancels any pending suggestions. |
clone |
Clones input. |
closeSuggestions |
Closes the suggestion list. |
destroySuggestionColumns |
Destroys all the suggestionColumns in the aggregation suggestionColumns. |
destroySuggestionItems |
Destroys suggestion items. |
destroySuggestionRows |
Destroys all the suggestionRows in the aggregation suggestionRows. |
detachLiveChange |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachSubmit |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachSuggest |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachSuggestionItemSelected |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachValueHelpRequest |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
sap.m.Input.extend |
Creates a new subclass of class sap.m.Input with name
|
fireLiveChange |
Fires event liveChange to attached listeners. |
fireSubmit |
Fires event submit to attached listeners. |
fireSuggest |
Fires event suggest to attached listeners. |
fireSuggestionItemSelected |
Fires event suggestionItemSelected to attached listeners. |
fireValueHelpRequest |
Fires event valueHelpRequest to attached listeners. |
getAccessibilityInfo |
Gets accessibility information for the input.
|
getAutocomplete |
Gets current value of property autocomplete. Specifies whether autocomplete is enabled. Works only if "showSuggestion" property is set to true. Note: The autocomplete feature is disabled on Android devices due to a OS specific issue. Default value is |
getDateFormat |
Gets current value of property dateFormat. Only used if type=date and no datepicker is available. The data is displayed and the user input is parsed according to this format. Note: The value property is always of the form RFC 3339 (YYYY-MM-dd). Default value is
Since 1.9.1 <code>sap.m.DatePicker</code>, <code>sap.m.TimePicker</code> or <code>sap.m.DateTimePicker</code> should be used for date/time inputs and formating.
|
getDescription |
Gets current value of property description. The description is a text after the input field, e.g. units of measurement, currencies. |
getDOMValue |
Gets the inner input DOM value. |
getEnableSuggestionsHighlighting |
Gets current value of property enableSuggestionsHighlighting. Specifies whether the suggestions highlighting is enabled. Default value is |
getEnableTableAutoPopinMode |
Gets current value of property enableTableAutoPopinMode. Enables the Default value is |
getFieldWidth |
Gets current value of property fieldWidth. This property only takes effect if the description property is set. It controls the distribution of space between the input field and the description text. The default value is 50% leaving the other 50% for the description. Default value is |
getFilterSuggests |
Gets current value of property filterSuggests. Defines whether to filter the provided suggestions before showing them to the user. Default value is |
getMaxLength |
Gets current value of property maxLength. Maximum number of characters. Value '0' means the feature is switched off. This parameter is not compatible with the input type Default value is |
getMaxSuggestionWidth |
Gets current value of property maxSuggestionWidth. If set, the value of this parameter will control the horizontal size of the suggestion list to display more data. This allows suggestion lists to be wider than the input field if there is enough space available. By default, the suggestion list is always as wide as the input field. Note: The value will be ignored if the actual width of the input field is larger than the specified parameter value. |
sap.m.Input.getMetadata |
Returns a metadata object for class sap.m.Input. |
getSelectedItem |
ID of the element which is the current target of the association selectedItem, or |
getSelectedKey |
Gets current value of property selectedKey. Defines the key of the selected item. Note: If duplicate keys exist, the first item matching the key is used. Default value is |
getSelectedRow |
ID of the element which is the current target of the association selectedRow, or |
getShowClearIcon |
Gets current value of property showClearIcon. Specifies whether clear icon is shown. Pressing the icon will clear input's value and fire the change and liveChange events. Default value is |
getShowSuggestion |
Gets current value of property showSuggestion. If this is set to true, suggest event is fired when user types in the input. Changing the suggestItems aggregation in suggest event listener will show suggestions within a popup. When runs on phone, input will first open a dialog where the input and suggestions are shown. When runs on a tablet, the suggestions are shown in a popup next to the input. Default value is |
getShowTableSuggestionValueHelp |
Gets current value of property showTableSuggestionValueHelp. For tabular suggestions, this flag will show/hide the button at the end of the suggestion table that triggers the event "valueHelpRequest" when pressed. The default value is true. Note: If suggestions are not tabular or no suggestions are used, the button will not be displayed and this flag is without effect. Default value is |
getShowValueHelp |
Gets current value of property showValueHelp. If set to true, a value help indicator will be displayed inside the control. When clicked the event "valueHelpRequest" will be fired. Default value is |
getShowValueStateMessage |
Getter for property Default value is |
getStartSuggestion |
Gets current value of property startSuggestion. Minimum length of the entered text in input before suggest event is fired. The default value is 1 which means the suggest event is fired after user types in input. Note: When it's set to 0, suggest event is fired when input with no text gets focus. In this case no suggestion popup will open. Default value is |
getSuggestionColumns |
Gets content of aggregation suggestionColumns. The suggestionColumns and suggestionRows are for tabular input suggestions. This aggregation allows for binding the table columns; for more details see the aggregation "suggestionRows". |
getSuggestionItemByKey |
Gets the item with the given key from the aggregation |
getSuggestionItems |
Gets content of aggregation suggestionItems. Defines the items displayed in the suggestion popup. Changing this aggregation (by calling To display suggestions with two text values, add Note: Only Note: Disabled items are not visualized in the list with the suggestions, however they can still be accessed through the aggregation. Note: If |
getSuggestionRows |
Gets content of aggregation suggestionRows. The suggestionColumns and suggestionRows are for tabular input suggestions. This aggregation allows for binding the table cells. The items of this aggregation are to be bound directly or to set in the suggest event method. Note: If |
getSuggestionRowValidator |
Gets current value of property suggestionRowValidator. Defines the validation callback function called when a suggestion row gets selected. Default value is |
getTextFormatMode |
Gets current value of property textFormatMode. Defines the display text format mode. Default value is |
getTextFormatter |
Gets current value of property textFormatter. Defines the display text formatter function. Default value is |
getType |
Gets current value of property type. HTML type of the internal Default value is |
getValue |
Gets the input value. |
getValueHelpIconSrc |
Gets current value of property valueHelpIconSrc. Set custom value help icon. Default value is |
getValueHelpOnly |
Gets current value of property valueHelpOnly. If set to true, direct text input is disabled and the control will trigger the event "valueHelpRequest" for all user interactions. The properties "showValueHelp", "editable", and "enabled" must be set to true, otherwise the property will have no effect Default value is |
getValueLiveUpdate |
Gets current value of property valueLiveUpdate. Indicates when the value gets updated with the user changes: At each keystroke (true) or first when the user presses enter or tabs out (false). Note: When set to true and the value of the Input control is bound to a model, the change event becomes obsolete and will not be fired, as the value in the model will be updated each time the user provides input. In such cases, subscription to the liveChange event is more appropriate, as it corresponds to the way the underlying model gets updated. Default value is |
getValueStateText |
Getter for property Default value is empty/ |
indexOfSuggestionColumn |
Checks for the provided |
indexOfSuggestionItem |
Checks for the provided |
indexOfSuggestionRow |
Checks for the provided |
insertSuggestionColumn |
Inserts a suggestionColumn into the aggregation suggestionColumns. |
insertSuggestionItem |
Inserts suggestion item. |
insertSuggestionRow |
Inserts a suggestionRow into the aggregation suggestionRows. |
invalidate |
Invalidates the control. |
isMobileDevice |
Indicates whether the control should use |
isValueHelpOnlyOpener |
Gets the supported openers for the valueHelpOnly. In the context of the Input, all targets are valid. |
onBeforeRendering |
Overwrites the onBeforeRendering. |
onchange |
Event handler for browsers' |
onfocusin |
Event handler for the onFocusIn event. |
oninput |
Event handler for user input. |
onmousedown |
Keyboard handler for the onMouseDown event. |
onsapenter |
Keyboard handler for enter key. |
onsapescape |
Keyboard handler for escape key. |
onsapfocusleave |
Keyboard handler for the onFocusLeave event. |
onsapright |
Finalizes autocomplete and fires liveChange event eventually. |
ontap |
Fire valueHelpRequest event on tap. |
preventChangeOnFocusLeave |
Hook method to prevent the change event from being fired when the text input field loses focus. |
removeAllSuggestionColumns |
Removes all the controls from the aggregation suggestionColumns. Additionally, it unregisters them from the hosting UIArea. |
removeAllSuggestionItems |
Removes all suggestion items. |
removeAllSuggestionRows |
Removes all the controls from the aggregation suggestionRows. Additionally, it unregisters them from the hosting UIArea. |
removeSuggestionColumn |
Removes a suggestionColumn from the aggregation suggestionColumns. |
removeSuggestionItem |
Removes suggestion item. |
removeSuggestionRow |
Removes a suggestionRow from the aggregation suggestionRows. |
setAutocomplete |
Sets a new value for property autocomplete. Specifies whether autocomplete is enabled. Works only if "showSuggestion" property is set to true. Note: The autocomplete feature is disabled on Android devices due to a OS specific issue. When called with a value of Default value is |
setDateFormat |
Sets a new value for property dateFormat. Only used if type=date and no datepicker is available. The data is displayed and the user input is parsed according to this format. Note: The value property is always of the form RFC 3339 (YYYY-MM-dd). When called with a value of Default value is
Since 1.9.1 <code>sap.m.DatePicker</code>, <code>sap.m.TimePicker</code> or <code>sap.m.DateTimePicker</code> should be used for date/time inputs and formating.
|
setDescription |
Sets a new value for property description. The description is a text after the input field, e.g. units of measurement, currencies. When called with a value of |
setDOMValue |
Sets the inner input DOM value. |
setEnableSuggestionsHighlighting |
Sets a new value for property enableSuggestionsHighlighting. Specifies whether the suggestions highlighting is enabled. When called with a value of Default value is |
setEnableTableAutoPopinMode |
Sets a new value for property enableTableAutoPopinMode. Enables the When called with a value of Default value is |
setFieldWidth |
Sets a new value for property fieldWidth. This property only takes effect if the description property is set. It controls the distribution of space between the input field and the description text. The default value is 50% leaving the other 50% for the description. When called with a value of Default value is |
setFilterFunction |
Sets a custom filter function for suggestions. The default is to check whether the first item text begins with the typed value. For one and two-value suggestions this callback function will operate on sap.ui.core.Item types, for tabular suggestions the function will operate on sap.m.ColumnListItem types. |
setFilterSuggests |
Sets a new value for property filterSuggests. Defines whether to filter the provided suggestions before showing them to the user. When called with a value of Default value is |
setMaxLength |
Sets a new value for property maxLength. Maximum number of characters. Value '0' means the feature is switched off. This parameter is not compatible with the input type When called with a value of Default value is |
setMaxSuggestionWidth |
Sets a new value for property maxSuggestionWidth. If set, the value of this parameter will control the horizontal size of the suggestion list to display more data. This allows suggestion lists to be wider than the input field if there is enough space available. By default, the suggestion list is always as wide as the input field. Note: The value will be ignored if the actual width of the input field is larger than the specified parameter value. When called with a value of |
setRowResultFunction |
Sets a custom result filter function for tabular suggestions to select the text that is passed to the input field. Default is to check whether the first cell with a "text" property begins with the typed value. For one value and two-value suggestions this callback function is not called. |
setSelectedItem |
Sets the |
setSelectedKey |
Sets the Default value is an empty string |
setSelectedRow |
Sets the |
setShowClearIcon |
Sets a new value for property showClearIcon. Specifies whether clear icon is shown. Pressing the icon will clear input's value and fire the change and liveChange events. When called with a value of Default value is |
setShowSuggestion |
Sets a new value for property showSuggestion. If this is set to true, suggest event is fired when user types in the input. Changing the suggestItems aggregation in suggest event listener will show suggestions within a popup. When runs on phone, input will first open a dialog where the input and suggestions are shown. When runs on a tablet, the suggestions are shown in a popup next to the input. When called with a value of Default value is |
setShowTableSuggestionValueHelp |
Shows value help suggestions in table. |
setShowValueHelp |
Sets a new value for property showValueHelp. If set to true, a value help indicator will be displayed inside the control. When clicked the event "valueHelpRequest" will be fired. When called with a value of Default value is |
setShowValueStateMessage |
Setter for property Default value is |
setStartSuggestion |
Sets a new value for property startSuggestion. Minimum length of the entered text in input before suggest event is fired. The default value is 1 which means the suggest event is fired after user types in input. Note: When it's set to 0, suggest event is fired when input with no text gets focus. In this case no suggestion popup will open. When called with a value of Default value is |
setSuggestionRowValidator |
Sets a new value for property suggestionRowValidator. Defines the validation callback function called when a suggestion row gets selected. When called with a value of Default value is |
setTextFormatMode |
Sets a new value for property textFormatMode. Defines the display text format mode. When called with a value of Default value is |
setTextFormatter |
Sets a new value for property textFormatter. Defines the display text formatter function. When called with a value of Default value is |
setType |
Sets a new value for property type. HTML type of the internal When called with a value of Default value is |
setValue |
Setter for property Default value is empty/ |
setValueHelpIconSrc |
Sets a new value for property valueHelpIconSrc. Set custom value help icon. When called with a value of Default value is |
setValueHelpOnly |
Sets a new value for property valueHelpOnly. If set to true, direct text input is disabled and the control will trigger the event "valueHelpRequest" for all user interactions. The properties "showValueHelp", "editable", and "enabled" must be set to true, otherwise the property will have no effect When called with a value of Default value is |
setValueLiveUpdate |
Sets a new value for property valueLiveUpdate. Indicates when the value gets updated with the user changes: At each keystroke (true) or first when the user presses enter or tabs out (false). Note: When set to true and the value of the Input control is bound to a model, the change event becomes obsolete and will not be fired, as the value in the model will be updated each time the user provides input. In such cases, subscription to the liveChange event is more appropriate, as it corresponds to the way the underlying model gets updated. When called with a value of Default value is |
setValueStateText |
Setter for property Default value is empty/ |
showItems |
Opens the |
unbindSuggestionColumns |
Unbinds aggregation suggestionColumns from model data. |
unbindSuggestionRows |
Unbinds aggregation suggestionRows from model data. |
updateInputField |
Updates the inner input field. |
updateSuggestionItems |
Update suggestion items. |
Modifies Dialog's Input instance
Param | Type | DefaultValue | Description |
---|---|---|---|
oInput | sap.m.Input |
Adds some suggestionColumn to the aggregation suggestionColumns.
Param | Type | DefaultValue | Description |
---|---|---|---|
oSuggestionColumn | sap.m.Column |
The suggestionColumn to add; if empty, nothing is inserted |
Adds suggestion item.
Param | Type | DefaultValue | Description |
---|---|---|---|
oItem | sap.ui.core.Item |
Suggestion item. |
Adds some suggestionRow to the aggregation suggestionRows.
Param | Type | DefaultValue | Description |
---|---|---|---|
vSuggestionRow | sap.m.ColumnListItem sap.m.GroupHeaderListItem |
The suggestionRow to add; if empty, nothing is inserted |
Attaches event handler fnFunction
to the liveChange event of this sap.m.Input
.
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.Input
itself.
Fired when the value of the input is changed by user interaction - each keystroke, delete, paste, etc.
Note: Browsing autocomplete suggestions does not fires the event.
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 |
Attaches event handler fnFunction
to the submit event of this sap.m.Input
.
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.Input
itself.
This event is fired when user presses the Enter key on the input.
Notes:
editable
, enabled
and not valueHelpOnly
).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 |
Attaches event handler fnFunction
to the suggest event of this sap.m.Input
.
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.Input
itself.
This event is fired when user types in the input and showSuggestion is set to true. Changing the suggestItems aggregation will show the suggestions within a popup.
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 |
Attaches event handler fnFunction
to the suggestionItemSelected event of this sap.m.Input
.
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.Input
itself.
This event is fired when suggestionItem shown in suggestion popup are selected. This event is only fired when showSuggestion is set to true and there are suggestionItems shown in the suggestion popup.
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 |
Attaches event handler fnFunction
to the valueHelpRequest event of this sap.m.Input
.
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.Input
itself.
When the value help indicator is clicked, this event will be fired.
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 suggestionColumns 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 |
Binds aggregation suggestionRows 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 liveChange event of this sap.m.Input
.
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 |
Detaches event handler fnFunction
from the submit event of this sap.m.Input
.
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 |
Detaches event handler fnFunction
from the suggest event of this sap.m.Input
.
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 |
Detaches event handler fnFunction
from the suggestionItemSelected event of this sap.m.Input
.
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 |
Detaches event handler fnFunction
from the valueHelpRequest event of this sap.m.Input
.
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.Input 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.InputBase.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 liveChange to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
|
value | string |
The current value of the input, after a live change event. |
|
escPressed | boolean |
Indicates that ESC key triggered the event. Note: This parameter will not be sent unless the ESC key is pressed. |
|
previousValue | string |
The value of the input before pressing ESC key. Note: This parameter will not be sent unless the ESC key is pressed. |
Fires event submit to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
|
value | string |
The new value of the input. |
Fires event suggest to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
|
suggestValue | string |
The current value which has been typed in the input. |
|
suggestionColumns | sap.m.ListBase |
The suggestion list is passed to this event for convenience. If you use list-based or tabular suggestions, fill the suggestionList with the items you want to suggest. Otherwise, directly add the suggestions to the "suggestionItems" aggregation of the input control. |
Fires event suggestionItemSelected to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
|
selectedItem | sap.ui.core.Item |
This is the item selected in the suggestion popup for one and two-value suggestions. For tabular suggestions, this value will not be set. |
|
selectedRow | sap.m.ColumnListItem |
This is the row selected in the tabular suggestion popup represented as a ColumnListItem. For one and two-value suggestions, this value will not be set. Note: The row result function to select a result value for the string is already executed at this time. To pick different value for the input field or to do follow up steps after the item has been selected. |
Fires event valueHelpRequest to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
|
fromSuggestions | boolean |
The event parameter is set to true, when the button at the end of the suggestion table is clicked, otherwise false. It can be used to determine whether the "value help" trigger or the "show all items" trigger has been pressed. |
Gets accessibility information for the input.
References:
Gets current value of property autocomplete.
Specifies whether autocomplete is enabled. Works only if "showSuggestion" property is set to true. Note: The autocomplete feature is disabled on Android devices due to a OS specific issue.
Default value is true
.
Gets current value of property dateFormat.
Only used if type=date and no datepicker is available. The data is displayed and the user input is parsed according to this format. Note: The value property is always of the form RFC 3339 (YYYY-MM-dd).
Default value is 'YYYY-MM-dd'
.
Gets current value of property description.
The description is a text after the input field, e.g. units of measurement, currencies.
Gets current value of property enableSuggestionsHighlighting.
Specifies whether the suggestions highlighting is enabled.
Default value is true
.
Gets current value of property enableTableAutoPopinMode.
Enables the autoPopinMode
of sap.m.Table
, when the input has tabular suggestions. Note: The autoPopinMode
overwrites the demandPopin
and the minScreenWidth
properties of the sap.m.Column
. When setting, enableTableAutoPopinMode
, from true to false, the application must reconfigure the demandPopin
and minScreenWidth
properties of the sap.m.Column
control by itself.
Default value is false
.
Gets current value of property fieldWidth.
This property only takes effect if the description property is set. It controls the distribution of space between the input field and the description text. The default value is 50% leaving the other 50% for the description.
Default value is '50%'
.
Gets current value of property filterSuggests.
Defines whether to filter the provided suggestions before showing them to the user.
Default value is true
.
Gets current value of property maxLength.
Maximum number of characters. Value '0' means the feature is switched off. This parameter is not compatible with the input type sap.m.InputType.Number
. If the input type is set to Number
, the maxLength
value is ignored.
Default value is 0
.
Gets current value of property maxSuggestionWidth.
If set, the value of this parameter will control the horizontal size of the suggestion list to display more data. This allows suggestion lists to be wider than the input field if there is enough space available. By default, the suggestion list is always as wide as the input field. Note: The value will be ignored if the actual width of the input field is larger than the specified parameter value.
ID of the element which is the current target of the association selectedItem, or null
.
Gets current value of property selectedKey.
Defines the key of the selected item.
Note: If duplicate keys exist, the first item matching the key is used.
Default value is empty string
.
ID of the element which is the current target of the association selectedRow, or null
.
Gets current value of property showClearIcon.
Specifies whether clear icon is shown. Pressing the icon will clear input's value and fire the change and liveChange events.
Default value is false
.
Gets current value of property showSuggestion.
If this is set to true, suggest event is fired when user types in the input. Changing the suggestItems aggregation in suggest event listener will show suggestions within a popup. When runs on phone, input will first open a dialog where the input and suggestions are shown. When runs on a tablet, the suggestions are shown in a popup next to the input.
Default value is false
.
Gets current value of property showTableSuggestionValueHelp.
For tabular suggestions, this flag will show/hide the button at the end of the suggestion table that triggers the event "valueHelpRequest" when pressed. The default value is true.
Note: If suggestions are not tabular or no suggestions are used, the button will not be displayed and this flag is without effect.
Default value is true
.
Gets current value of property showValueHelp.
If set to true, a value help indicator will be displayed inside the control. When clicked the event "valueHelpRequest" will be fired.
Default value is false
.
Getter for property showValueStateMessage
. Whether the value state message should be shown. This property is already available for sap.m.Input since 1.16.0.
Default value is true
Gets current value of property startSuggestion.
Minimum length of the entered text in input before suggest event is fired. The default value is 1 which means the suggest event is fired after user types in input.
Note: When it's set to 0, suggest event is fired when input with no text gets focus. In this case no suggestion popup will open.
Default value is 1
.
Gets content of aggregation suggestionColumns.
The suggestionColumns and suggestionRows are for tabular input suggestions. This aggregation allows for binding the table columns; for more details see the aggregation "suggestionRows".
Gets the item with the given key from the aggregation suggestionItems
. Note: If duplicate keys exist, the first item matching the key is returned.
Param | Type | DefaultValue | Description |
---|---|---|---|
sKey | string |
An item key that specifies the item to retrieve. |
Gets content of aggregation suggestionItems.
Defines the items displayed in the suggestion popup. Changing this aggregation (by calling addSuggestionItem
, insertSuggestionItem
, removeSuggestionItem
, removeAllSuggestionItems
, or destroySuggestionItems
) after Input
is rendered opens/closes the suggestion popup.
To display suggestions with two text values, add sap.ui.core.ListItem
as SuggestionItems
(since 1.21.1). For the selected ListItem
, only the first value is returned to the input field.
Note: Only text
and additionalText
property values of the item are displayed. For example, if an icon
is set, it is ignored. To display more information per item (including icons), you can use the suggestionRows
aggregation.
Note: Disabled items are not visualized in the list with the suggestions, however they can still be accessed through the aggregation. Note: If suggestionItems
& suggestionRows
are set in parallel, the last aggeragtion to come would overwrite the previous ones.
Gets content of aggregation suggestionRows.
The suggestionColumns and suggestionRows are for tabular input suggestions. This aggregation allows for binding the table cells. The items of this aggregation are to be bound directly or to set in the suggest event method. Note: If suggestionItems
& suggestionRows
are set in parallel, the last aggeragtion to come would overwrite the previous ones.
Gets current value of property suggestionRowValidator.
Defines the validation callback function called when a suggestion row gets selected.
Default value is empty string
.
Gets current value of property textFormatMode.
Defines the display text format mode.
Default value is Value
.
Gets current value of property textFormatter.
Defines the display text formatter function.
Default value is empty string
.
Gets current value of property type.
HTML type of the internal input
tag (e.g. Text, Number, Email, Phone). The particular effect of this property differs depending on the browser and the current language settings, especially for the type Number.
This parameter is intended to be used with touch devices that use different soft keyboard layouts depending on the given input type.
Only the default value sap.m.InputType.Text
may be used in combination with data model formats. sap.ui.model
defines extended formats that are mostly incompatible with normal HTML representations for numbers and dates.
Default value is Text
.
Gets current value of property valueHelpIconSrc.
Set custom value help icon.
Default value is "sap-icon://value-help"
.
Gets current value of property valueHelpOnly.
If set to true, direct text input is disabled and the control will trigger the event "valueHelpRequest" for all user interactions. The properties "showValueHelp", "editable", and "enabled" must be set to true, otherwise the property will have no effect
Default value is false
.
Gets current value of property valueLiveUpdate.
Indicates when the value gets updated with the user changes: At each keystroke (true) or first when the user presses enter or tabs out (false).
Note: When set to true and the value of the Input control is bound to a model, the change event becomes obsolete and will not be fired, as the value in the model will be updated each time the user provides input. In such cases, subscription to the liveChange event is more appropriate, as it corresponds to the way the underlying model gets updated.
Default value is false
.
Getter for property valueStateText
. The text which is shown in the value state message popup. If not specfied a default text is shown. This property is already available for sap.m.Input since 1.16.0.
Default value is empty/undefined
Checks for the provided sap.m.Column
in the aggregation suggestionColumns. and returns its index if found or -1 otherwise.
Param | Type | DefaultValue | Description |
---|---|---|---|
oSuggestionColumn | sap.m.Column |
The suggestionColumn whose index is looked for |
Checks for the provided sap.ui.core.Item
in the aggregation suggestionItems. and returns its index if found or -1 otherwise.
Param | Type | DefaultValue | Description |
---|---|---|---|
oSuggestionItem | sap.ui.core.Item |
The suggestionItem whose index is looked for |
Checks for the provided sap.m.ColumnListItem
in the aggregation suggestionRows. and returns its index if found or -1 otherwise.
Param | Type | DefaultValue | Description |
---|---|---|---|
vSuggestionRow | sap.m.ColumnListItem sap.m.GroupHeaderListItem |
The suggestionRow whose index is looked for |
Inserts a suggestionColumn into the aggregation suggestionColumns.
Param | Type | DefaultValue | Description |
---|---|---|---|
oSuggestionColumn | sap.m.Column |
The suggestionColumn to insert; if empty, nothing is inserted |
|
iIndex | int |
The |
Inserts suggestion item.
Param | Type | DefaultValue | Description |
---|---|---|---|
oItem | sap.ui.core.Item |
Suggestion item. |
|
iIndex | int |
Index to be inserted. |
Inserts a suggestionRow into the aggregation suggestionRows.
Param | Type | DefaultValue | Description |
---|---|---|---|
vSuggestionRow | sap.m.ColumnListItem sap.m.GroupHeaderListItem |
The suggestionRow to insert; if empty, nothing is inserted |
|
iIndex | int |
The |
Gets the supported openers for the valueHelpOnly. In the context of the Input, all targets are valid.
Param | Type | DefaultValue | Description |
---|---|---|---|
oTarget | HTMLElement undefined |
The target of the event. |
Event handler for browsers' change
event.
Param | Type | DefaultValue | Description |
---|---|---|---|
oEvent | jQuery.Event |
The event. |
Event handler for the onFocusIn event.
Param | Type | DefaultValue | Description |
---|---|---|---|
oEvent | jQuery.Event |
On focus in event. |
Event handler for user input.
Param | Type | DefaultValue | Description |
---|---|---|---|
oEvent | jQuery.Event |
User input. |
Keyboard handler for the onMouseDown event.
Param | Type | DefaultValue | Description |
---|---|---|---|
oEvent | jQuery.Event |
Keyboard event. |
Keyboard handler for enter key.
Param | Type | DefaultValue | Description |
---|---|---|---|
oEvent | jQuery.Event |
Keyboard event. |
Keyboard handler for escape key.
Param | Type | DefaultValue | Description |
---|---|---|---|
oEvent | jQuery.Event |
Keyboard event. |
Keyboard handler for the onFocusLeave event.
Param | Type | DefaultValue | Description |
---|---|---|---|
oEvent | jQuery.Event |
Keyboard event. |
Fire valueHelpRequest event on tap.
Param | Type | DefaultValue | Description |
---|---|---|---|
oEvent | jQuery.Event |
Ontap event. |
Hook method to prevent the change event from being fired when the text input field loses focus.
Param | Type | DefaultValue | Description |
---|---|---|---|
oEvent | jQuery.Event |
The event object. |
Removes all the controls from the aggregation suggestionColumns.
Additionally, it unregisters them from the hosting UIArea.
Removes all the controls from the aggregation suggestionRows.
Additionally, it unregisters them from the hosting UIArea.
Removes a suggestionColumn from the aggregation suggestionColumns.
Param | Type | DefaultValue | Description |
---|---|---|---|
vSuggestionColumn | int string sap.m.Column |
The suggestionColumn to remove or its index or id |
Removes suggestion item.
Param | Type | DefaultValue | Description |
---|---|---|---|
oItem | sap.ui.core.Item |
Suggestion item. |
Removes a suggestionRow from the aggregation suggestionRows.
Param | Type | DefaultValue | Description |
---|---|---|---|
vSuggestionRow | int string sap.m.ColumnListItem sap.m.GroupHeaderListItem |
The suggestionRow to remove or its index or id |
Sets a new value for property autocomplete.
Specifies whether autocomplete is enabled. Works only if "showSuggestion" property is set to true. Note: The autocomplete feature is disabled on Android devices due to a OS specific issue.
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 |
---|---|---|---|
bAutocomplete | boolean | true |
New value for property |
Sets a new value for property dateFormat.
Only used if type=date and no datepicker is available. The data is displayed and the user input is parsed according to this format. Note: The value property is always of the form RFC 3339 (YYYY-MM-dd).
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is 'YYYY-MM-dd'
.
Param | Type | DefaultValue | Description |
---|---|---|---|
sDateFormat | string | 'YYYY-MM-dd' |
New value for property |
Sets a new value for property description.
The description is a text after the input field, e.g. units of measurement, currencies.
When called with a value of null
or undefined
, the default value of the property will be restored.
Param | Type | DefaultValue | Description |
---|---|---|---|
sDescription | string |
New value for property |
Sets the inner input DOM value.
Param | Type | DefaultValue | Description |
---|---|---|---|
value | string |
Dom value which will be set. |
Sets a new value for property enableSuggestionsHighlighting.
Specifies whether the suggestions highlighting is enabled.
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 |
---|---|---|---|
bEnableSuggestionsHighlighting | boolean | true |
New value for property |
Sets a new value for property enableTableAutoPopinMode.
Enables the autoPopinMode
of sap.m.Table
, when the input has tabular suggestions. Note: The autoPopinMode
overwrites the demandPopin
and the minScreenWidth
properties of the sap.m.Column
. When setting, enableTableAutoPopinMode
, from true to false, the application must reconfigure the demandPopin
and minScreenWidth
properties of the sap.m.Column
control by itself.
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 |
---|---|---|---|
bEnableTableAutoPopinMode | boolean | false |
New value for property |
Sets a new value for property fieldWidth.
This property only takes effect if the description property is set. It controls the distribution of space between the input field and the description text. The default value is 50% leaving the other 50% for the description.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is '50%'
.
Param | Type | DefaultValue | Description |
---|---|---|---|
sFieldWidth | sap.ui.core.CSSSize | '50%' |
New value for property |
Sets a custom filter function for suggestions. The default is to check whether the first item text begins with the typed value. For one and two-value suggestions this callback function will operate on sap.ui.core.Item types, for tabular suggestions the function will operate on sap.m.ColumnListItem types.
Param | Type | DefaultValue | Description |
---|---|---|---|
fnFilter | function |
The filter function is called when displaying suggestion items and has two input parameters: the first one is the string that is currently typed in the input field and the second one is the item that is being filtered. Returning true will add this item to the popup, returning false will not display it. |
Sets a new value for property filterSuggests.
Defines whether to filter the provided suggestions before showing them to the user.
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 |
---|---|---|---|
bFilterSuggests | boolean | true |
New value for property |
Sets a new value for property maxLength.
Maximum number of characters. Value '0' means the feature is switched off. This parameter is not compatible with the input type sap.m.InputType.Number
. If the input type is set to Number
, the maxLength
value is ignored.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is 0
.
Param | Type | DefaultValue | Description |
---|---|---|---|
iMaxLength | int | 0 |
New value for property |
Sets a new value for property maxSuggestionWidth.
If set, the value of this parameter will control the horizontal size of the suggestion list to display more data. This allows suggestion lists to be wider than the input field if there is enough space available. By default, the suggestion list is always as wide as the input field. Note: The value will be ignored if the actual width of the input field is larger than the specified parameter value.
When called with a value of null
or undefined
, the default value of the property will be restored.
Param | Type | DefaultValue | Description |
---|---|---|---|
sMaxSuggestionWidth | sap.ui.core.CSSSize |
New value for property |
Sets a custom result filter function for tabular suggestions to select the text that is passed to the input field. Default is to check whether the first cell with a "text" property begins with the typed value. For one value and two-value suggestions this callback function is not called.
Param | Type | DefaultValue | Description |
---|---|---|---|
fnFilter | function |
The result function is called with one parameter: the sap.m.ColumnListItem that is selected. The function must return a result string that will be displayed as the input field's value. |
Sets the selectedItem
association.
Param | Type | DefaultValue | Description |
---|---|---|---|
oItem | sap.ui.core.Item |
New value for the |
Sets the selectedKey
property.
Default value is an empty string ""
or undefined
.
Param | Type | DefaultValue | Description |
---|---|---|---|
sKey | string |
New value for property |
Sets the selectedRow
association. Default value is null
.
Param | Type | DefaultValue | Description |
---|---|---|---|
oListItem | sap.m.ColumnListItem |
New value for the |
Sets a new value for property showClearIcon.
Specifies whether clear icon is shown. Pressing the icon will clear input's value and fire the change and liveChange events.
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 |
---|---|---|---|
bShowClearIcon | boolean | false |
New value for property |
Sets a new value for property showSuggestion.
If this is set to true, suggest event is fired when user types in the input. Changing the suggestItems aggregation in suggest event listener will show suggestions within a popup. When runs on phone, input will first open a dialog where the input and suggestions are shown. When runs on a tablet, the suggestions are shown in a popup next to the input.
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 |
---|---|---|---|
bShowSuggestion | boolean | false |
New value for property |
Shows value help suggestions in table.
Param | Type | DefaultValue | Description |
---|---|---|---|
bValue | boolean |
Show suggestions. |
Sets a new value for property showValueHelp.
If set to true, a value help indicator will be displayed inside the control. When clicked the event "valueHelpRequest" will be fired.
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 |
---|---|---|---|
bShowValueHelp | boolean | false |
New value for property |
Setter for property showValueStateMessage
.
Default value is true
Param | Type | DefaultValue | Description |
---|---|---|---|
bShowValueStateMessage | boolean |
new value for property |
Sets a new value for property startSuggestion.
Minimum length of the entered text in input before suggest event is fired. The default value is 1 which means the suggest event is fired after user types in input.
Note: When it's set to 0, suggest event is fired when input with no text gets focus. In this case no suggestion popup will open.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is 1
.
Param | Type | DefaultValue | Description |
---|---|---|---|
iStartSuggestion | int | 1 |
New value for property |
Sets a new value for property suggestionRowValidator.
Defines the validation callback function called when a suggestion row gets selected.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is empty string
.
Param | Type | DefaultValue | Description |
---|---|---|---|
oSuggestionRowValidator | any | "" |
New value for property |
Sets a new value for property textFormatMode.
Defines the display text format mode.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is Value
.
Param | Type | DefaultValue | Description |
---|---|---|---|
sTextFormatMode | sap.m.InputTextFormatMode | Value |
New value for property |
Sets a new value for property textFormatter.
Defines the display text formatter function.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is empty string
.
Param | Type | DefaultValue | Description |
---|---|---|---|
oTextFormatter | any | "" |
New value for property |
Sets a new value for property type.
HTML type of the internal input
tag (e.g. Text, Number, Email, Phone). The particular effect of this property differs depending on the browser and the current language settings, especially for the type Number.
This parameter is intended to be used with touch devices that use different soft keyboard layouts depending on the given input type.
Only the default value sap.m.InputType.Text
may be used in combination with data model formats. sap.ui.model
defines extended formats that are mostly incompatible with normal HTML representations for numbers and dates.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is Text
.
Param | Type | DefaultValue | Description |
---|---|---|---|
sType | sap.m.InputType | Text |
New value for property |
Setter for property value
.
Default value is empty/undefined
.
Param | Type | DefaultValue | Description |
---|---|---|---|
sValue | string |
New value for property |
Sets a new value for property valueHelpIconSrc.
Set custom value help icon.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is "sap-icon://value-help"
.
Param | Type | DefaultValue | Description |
---|---|---|---|
sValueHelpIconSrc | sap.ui.core.URI | "sap-icon://value-help" |
New value for property |
Sets a new value for property valueHelpOnly.
If set to true, direct text input is disabled and the control will trigger the event "valueHelpRequest" for all user interactions. The properties "showValueHelp", "editable", and "enabled" must be set to true, otherwise the property will have no effect
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 |
---|---|---|---|
bValueHelpOnly | boolean | false |
New value for property |
Sets a new value for property valueLiveUpdate.
Indicates when the value gets updated with the user changes: At each keystroke (true) or first when the user presses enter or tabs out (false).
Note: When set to true and the value of the Input control is bound to a model, the change event becomes obsolete and will not be fired, as the value in the model will be updated each time the user provides input. In such cases, subscription to the liveChange event is more appropriate, as it corresponds to the way the underlying model gets updated.
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 |
---|---|---|---|
bValueLiveUpdate | boolean | false |
New value for property |
Setter for property valueStateText
.
Default value is empty/undefined
Param | Type | DefaultValue | Description |
---|---|---|---|
sValueStateText | string |
new value for property |