Class sap.m.InputModule: sap/m/Input

extends InputBase
known direct subclasses: Input, MultiInput

Enables users to input data.

Constructor Summary
new sap.m.Input(sId?, mSettings?)Constructor for a new Input.
Fields borrowed from class sap.m.InputBase
Event Summary
liveChange(oControlEvent)This event is fired when the value of the input is changed - e.g.
submit(oControlEvent)This event is fired when user presses the Enter key on the input.
suggest(oControlEvent)This event is fired when user types in the input and showSuggestion is set to true.
suggestionItemSelected(oControlEvent)This event is fired when suggestionItem shown in suggestion popup are selected.
valueHelpRequest(oControlEvent)When the value help indicator is clicked, this event will be fired.
Events borrowed from class sap.m.InputBase
Events borrowed from class sap.ui.core.Control
Method Summary
sap.m.Input.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.m.Input with name sClassName and enriches it with the information contained in oClassInfo.
sap.m.Input.getMetadata()Returns a metadata object for class sap.m.Input.
addSuggestionColumn(oSuggestionColumn)Adds some suggestionColumn to the aggregation suggestionColumns.
addSuggestionItem(oSuggestionItem)Adds some suggestionItem to the aggregation suggestionItems.
addSuggestionRow(oSuggestionRow)Adds some suggestionRow to the aggregation suggestionRows.
attachLiveChange(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the liveChange event of this sap.m.Input.
attachSubmit(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the submit event of this sap.m.Input.
attachSuggest(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the suggest event of this sap.m.Input.
attachSuggestionItemSelected(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the suggestionItemSelected event of this sap.m.Input.
attachValueHelpRequest(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the valueHelpRequest event of this sap.m.Input.
bindAggregation(sAggregationName, oBindingInfo)Forwards aggregations with the name of items or columns to the internal table.
bindSuggestionColumns(oBindingInfo)Binds aggregation suggestionColumns to model data.
bindSuggestionRows(oBindingInfo)Binds aggregation suggestionRows to model data.
destroySuggestionColumns()Destroys all the suggestionColumns in the aggregation suggestionColumns.
destroySuggestionItems()Destroys all the suggestionItems in the aggregation suggestionItems.
destroySuggestionRows()Destroys all the suggestionRows in the aggregation suggestionRows.
detachLiveChange(fnFunction, oListener)Detaches event handler fnFunction from the liveChange event of this sap.m.Input.
detachSubmit(fnFunction, oListener)Detaches event handler fnFunction from the submit event of this sap.m.Input.
detachSuggest(fnFunction, oListener)Detaches event handler fnFunction from the suggest event of this sap.m.Input.
detachSuggestionItemSelected(fnFunction, oListener)Detaches event handler fnFunction from the suggestionItemSelected event of this sap.m.Input.
detachValueHelpRequest(fnFunction, oListener)Detaches event handler fnFunction from the valueHelpRequest event of this sap.m.Input.
fireLiveChange(mArguments?)Fires event liveChange to attached listeners.
fireSubmit(mArguments?)Fires event submit to attached listeners.
fireSuggest(mArguments?)Fires event suggest to attached listeners.
fireSuggestionItemSelected(mArguments?)Fires event suggestionItemSelected to attached listeners.
fireValueHelpRequest(mArguments?)Fires event valueHelpRequest to attached listeners.
getDescription()Gets current value of property description.
getFieldWidth()Gets current value of property fieldWidth.
getFilterSuggests()Gets current value of property filterSuggests.
getMaxLength()Gets current value of property maxLength.
getMaxSuggestionWidth()Gets current value of property maxSuggestionWidth.
getShowSuggestion()Gets current value of property showSuggestion.
getShowTableSuggestionValueHelp()Gets current value of property showTableSuggestionValueHelp.
getShowValueHelp()Gets current value of property showValueHelp.
getShowValueStateMessage()Getter for property showValueStateMessage.
getStartSuggestion()Gets current value of property startSuggestion.
getSuggestionColumns()Gets content of aggregation suggestionColumns.
getSuggestionItems()Gets content of aggregation suggestionItems.
getSuggestionRows()Gets content of aggregation suggestionRows.
getType()Gets current value of property type.
getValueHelpOnly()Gets current value of property valueHelpOnly.
getValueLiveUpdate()Gets current value of property valueLiveUpdate.
getValueStateText()Getter for property valueStateText.
getWidth()Returns the width of the input.
indexOfSuggestionColumn(oSuggestionColumn)Checks for the provided sap.m.Column in the aggregation suggestionColumns.
indexOfSuggestionItem(oSuggestionItem)Checks for the provided sap.ui.core.Item in the aggregation suggestionItems.
indexOfSuggestionRow(oSuggestionRow)Checks for the provided sap.m.ColumnListItem in the aggregation suggestionRows.
insertSuggestionColumn(oSuggestionColumn, iIndex)Inserts a suggestionColumn into the aggregation suggestionColumns.
insertSuggestionItem(oSuggestionItem, iIndex)Inserts a suggestionItem into the aggregation suggestionItems.
insertSuggestionRow(oSuggestionRow, iIndex)Inserts a suggestionRow into the aggregation suggestionRows.
ontap(oEvent)Fire valueHelpRequest event on tap
removeAllSuggestionColumns()Removes all the controls from the aggregation suggestionColumns.
removeAllSuggestionItems()Removes all the controls from the aggregation suggestionItems.
removeAllSuggestionRows()Removes all the controls from the aggregation suggestionRows.
removeSuggestionColumn(vSuggestionColumn)Removes a suggestionColumn from the aggregation suggestionColumns.
removeSuggestionItem(vSuggestionItem)Removes a suggestionItem from the aggregation suggestionItems.
removeSuggestionRow(vSuggestionRow)Removes a suggestionRow from the aggregation suggestionRows.
setDescription(sDescription)Sets a new value for property description.
setFieldWidth(sFieldWidth)Sets a new value for property fieldWidth.
setFilterFunction(fnFilter)Sets a custom filter function for suggestions.
setFilterSuggests(bFilterSuggests)Sets a new value for property filterSuggests.
setMaxLength(iMaxLength)Sets a new value for property maxLength.
setMaxSuggestionWidth(sMaxSuggestionWidth)Sets a new value for property maxSuggestionWidth.
setRowResultFunction(fnFilter)Sets a custom result filter function for tabular suggestions to select the text that is passed to the input field.
setShowSuggestion(bShowSuggestion)Sets a new value for property showSuggestion.
setShowTableSuggestionValueHelp(bShowTableSuggestionValueHelp)Sets a new value for property showTableSuggestionValueHelp.
setShowValueHelp(bShowValueHelp)Sets a new value for property showValueHelp.
setShowValueStateMessage(bShowValueStateMessage)Setter for property showValueStateMessage.
setStartSuggestion(iStartSuggestion)Sets a new value for property startSuggestion.
setType(sType)Sets a new value for property type.
setValue(sValue)Setter for property value.
setValueHelpOnly(bValueHelpOnly)Sets a new value for property valueHelpOnly.
setValueLiveUpdate(bValueLiveUpdate)Sets a new value for property valueLiveUpdate.
setValueStateText(sValueStateText)Setter for property valueStateText.
setWidth(sWidth)Defines the width of the input.
unbindSuggestionColumns()Unbinds aggregation suggestionColumns from model data.
unbindSuggestionRows()Unbinds aggregation suggestionRows from model data.
getDateFormat()Gets current value of property dateFormat.
setDateFormat(sDateFormat)Sets a new value for property dateFormat.
Constructor Detail
new sap.m.Input(sId?, mSettings?)
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 for a general description of the syntax of the settings object.

The supported settings are:

In addition, all settings applicable to the base type sap.m.InputBase can be used as well.

Parameters:
{string}sId? id for the new control, generated automatically if no id is given
{object}mSettings? initial settings for the new control
Event Detail
liveChange(oControlEvent)
This event is fired when the value of the input is changed - e.g. at each keypress
Parameters:
{sap.ui.base.Event}oControlEvent
{sap.ui.base.EventProvider}oControlEvent.getSource
{object}oControlEvent.getParameters
{string}oControlEvent.getParameters.value The new value of the input.
submit(oControlEvent)
This event is fired when user presses the Enter key on the input.

Note: The event is fired independent of whether there was a change before or not. If a change was performed the event is fired after the change event. The event is also fired when an item of the select list is selected via Enter. The event is only fired on an input which allows text input (editable, enabled and not valueHelpOnly).

Parameters:
{sap.ui.base.Event}oControlEvent
{sap.ui.base.EventProvider}oControlEvent.getSource
{object}oControlEvent.getParameters
{string}oControlEvent.getParameters.value The new value of the input.
Since:
1.33.0
suggest(oControlEvent)
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.
Parameters:
{sap.ui.base.Event}oControlEvent
{sap.ui.base.EventProvider}oControlEvent.getSource
{object}oControlEvent.getParameters
{string}oControlEvent.getParameters.suggestValue The current value which has been typed in the input.
{sap.m.ListBase}oControlEvent.getParameters.suggestionColumns 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.
Since:
1.16.1
suggestionItemSelected(oControlEvent)
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.
Parameters:
{sap.ui.base.Event}oControlEvent
{sap.ui.base.EventProvider}oControlEvent.getSource
{object}oControlEvent.getParameters
{sap.ui.core.Item}oControlEvent.getParameters.selectedItem This is the item selected in the suggestion popup for one and two-value suggestions. For tabular suggestions, this value will not be set.
{sap.m.ColumnListItem}oControlEvent.getParameters.selectedRow 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.

Since:
1.16.3
valueHelpRequest(oControlEvent)
When the value help indicator is clicked, this event will be fired.
Parameters:
{sap.ui.base.Event}oControlEvent
{sap.ui.base.EventProvider}oControlEvent.getSource
{object}oControlEvent.getParameters
{boolean}oControlEvent.getParameters.fromSuggestions 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.
Since:
1.16
Method Detail
sap.m.Input.extend(sClassName, oClassInfo?, FNMetaImpl?): function
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.

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
sap.m.Input.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.m.Input.
Returns:
{sap.ui.base.Metadata} Metadata object describing this class
addSuggestionColumn(oSuggestionColumn): sap.m.Input
Adds some suggestionColumn to the aggregation suggestionColumns.
Parameters:
{sap.m.Column}oSuggestionColumn the suggestionColumn to add; if empty, nothing is inserted
Since:
1.21.1
Returns:
{sap.m.Input} Reference to this in order to allow method chaining
addSuggestionItem(oSuggestionItem): sap.m.Input
Adds some suggestionItem to the aggregation suggestionItems.
Parameters:
{sap.ui.core.Item}oSuggestionItem the suggestionItem to add; if empty, nothing is inserted
Since:
1.16.1
Returns:
{sap.m.Input} Reference to this in order to allow method chaining
addSuggestionRow(oSuggestionRow): sap.m.Input
Adds some suggestionRow to the aggregation suggestionRows.
Parameters:
{sap.m.ColumnListItem}oSuggestionRow the suggestionRow to add; if empty, nothing is inserted
Since:
1.21.1
Returns:
{sap.m.Input} Reference to this in order to allow method chaining
attachLiveChange(oData?, fnFunction, oListener?): sap.m.Input
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.

This event is fired when the value of the input is changed - e.g. at each keypress

Parameters:
{object}oData? An application-specific payload object that will be passed to the event handler along with the event object when firing the event
{function}fnFunction The function to be called when the event occurs
{object}oListener? Context object to call the event handler with. Defaults to this sap.m.Input itself
Returns:
{sap.m.Input} Reference to this in order to allow method chaining
attachSubmit(oData?, fnFunction, oListener?): sap.m.Input
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.

Note: The event is fired independent of whether there was a change before or not. If a change was performed the event is fired after the change event. The event is also fired when an item of the select list is selected via Enter. The event is only fired on an input which allows text input (editable, enabled and not valueHelpOnly).

Parameters:
{object}oData? An application-specific payload object that will be passed to the event handler along with the event object when firing the event
{function}fnFunction The function to be called when the event occurs
{object}oListener? Context object to call the event handler with. Defaults to this sap.m.Input itself
Since:
1.33.0
Returns:
{sap.m.Input} Reference to this in order to allow method chaining
attachSuggest(oData?, fnFunction, oListener?): sap.m.Input
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.

Parameters:
{object}oData? An application-specific payload object that will be passed to the event handler along with the event object when firing the event
{function}fnFunction The function to be called when the event occurs
{object}oListener? Context object to call the event handler with. Defaults to this sap.m.Input itself
Since:
1.16.1
Returns:
{sap.m.Input} Reference to this in order to allow method chaining
attachSuggestionItemSelected(oData?, fnFunction, oListener?): sap.m.Input
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.

Parameters:
{object}oData? An application-specific payload object that will be passed to the event handler along with the event object when firing the event
{function}fnFunction The function to be called when the event occurs
{object}oListener? Context object to call the event handler with. Defaults to this sap.m.Input itself
Since:
1.16.3
Returns:
{sap.m.Input} Reference to this in order to allow method chaining
attachValueHelpRequest(oData?, fnFunction, oListener?): sap.m.Input
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.

Parameters:
{object}oData? An application-specific payload object that will be passed to the event handler along with the event object when firing the event
{function}fnFunction The function to be called when the event occurs
{object}oListener? Context object to call the event handler with. Defaults to this sap.m.Input itself
Since:
1.16
Returns:
{sap.m.Input} Reference to this in order to allow method chaining
bindAggregation(sAggregationName, oBindingInfo): sap.m.Input
Forwards aggregations with the name of items or columns to the internal table.
Parameters:
{string}sAggregationName the name for the binding
{object}oBindingInfo the configuration parameters for the binding
Returns:
{sap.m.Input} this pointer for chaining
bindSuggestionColumns(oBindingInfo): sap.m.Input
Binds aggregation suggestionColumns to model data.

See ManagedObject.bindAggregation for a detailed description of the possible properties of oBindingInfo.

Parameters:
{object}oBindingInfo The binding information
Since:
1.21.1
Returns:
{sap.m.Input} Reference to this in order to allow method chaining
bindSuggestionRows(oBindingInfo): sap.m.Input
Binds aggregation suggestionRows to model data.

See ManagedObject.bindAggregation for a detailed description of the possible properties of oBindingInfo.

Parameters:
{object}oBindingInfo The binding information
Since:
1.21.1
Returns:
{sap.m.Input} Reference to this in order to allow method chaining
destroySuggestionColumns(): sap.m.Input
Destroys all the suggestionColumns in the aggregation suggestionColumns.
Since:
1.21.1
Returns:
{sap.m.Input} Reference to this in order to allow method chaining
destroySuggestionItems(): sap.m.Input
Destroys all the suggestionItems in the aggregation suggestionItems.
Since:
1.16.1
Returns:
{sap.m.Input} Reference to this in order to allow method chaining
destroySuggestionRows(): sap.m.Input
Destroys all the suggestionRows in the aggregation suggestionRows.
Since:
1.21.1
Returns:
{sap.m.Input} Reference to this in order to allow method chaining
detachLiveChange(fnFunction, oListener): sap.m.Input
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.

Parameters:
{function}fnFunction The function to be called, when the event occurs
{object}oListener Context object on which the given function had to be called
Returns:
{sap.m.Input} Reference to this in order to allow method chaining
detachSubmit(fnFunction, oListener): sap.m.Input
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.

Parameters:
{function}fnFunction The function to be called, when the event occurs
{object}oListener Context object on which the given function had to be called
Since:
1.33.0
Returns:
{sap.m.Input} Reference to this in order to allow method chaining
detachSuggest(fnFunction, oListener): sap.m.Input
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.

Parameters:
{function}fnFunction The function to be called, when the event occurs
{object}oListener Context object on which the given function had to be called
Since:
1.16.1
Returns:
{sap.m.Input} Reference to this in order to allow method chaining
detachSuggestionItemSelected(fnFunction, oListener): sap.m.Input
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.

Parameters:
{function}fnFunction The function to be called, when the event occurs
{object}oListener Context object on which the given function had to be called
Since:
1.16.3
Returns:
{sap.m.Input} Reference to this in order to allow method chaining
detachValueHelpRequest(fnFunction, oListener): sap.m.Input
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.

Parameters:
{function}fnFunction The function to be called, when the event occurs
{object}oListener Context object on which the given function had to be called
Since:
1.16
Returns:
{sap.m.Input} Reference to this in order to allow method chaining
fireLiveChange(mArguments?): sap.m.Input
Fires event liveChange to attached listeners.

Expects the following event parameters:

  • value of type stringThe new value of the input.
Parameters:
{Map}mArguments? The arguments to pass along with the event
Returns:
{sap.m.Input} Reference to this in order to allow method chaining
fireSubmit(mArguments?): sap.m.Input
Fires event submit to attached listeners.

Expects the following event parameters:

  • value of type stringThe new value of the input.
Parameters:
{Map}mArguments? The arguments to pass along with the event
Since:
1.33.0
Returns:
{sap.m.Input} Reference to this in order to allow method chaining
fireSuggest(mArguments?): sap.m.Input
Fires event suggest to attached listeners.

Expects the following event parameters:

  • suggestValue of type stringThe current value which has been typed in the input.
  • suggestionColumns of type sap.m.ListBaseThe 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.
Parameters:
{Map}mArguments? The arguments to pass along with the event
Since:
1.16.1
Returns:
{sap.m.Input} Reference to this in order to allow method chaining
fireSuggestionItemSelected(mArguments?): sap.m.Input
Fires event suggestionItemSelected to attached listeners.

Expects the following event parameters:

  • selectedItem of type sap.ui.core.ItemThis is the item selected in the suggestion popup for one and two-value suggestions. For tabular suggestions, this value will not be set.
  • selectedRow of type sap.m.ColumnListItemThis 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.

Parameters:
{Map}mArguments? The arguments to pass along with the event
Since:
1.16.3
Returns:
{sap.m.Input} Reference to this in order to allow method chaining
fireValueHelpRequest(mArguments?): sap.m.Input
Fires event valueHelpRequest to attached listeners.

Expects the following event parameters:

  • fromSuggestions of type booleanThe 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.
Parameters:
{Map}mArguments? The arguments to pass along with the event
Since:
1.16
Returns:
{sap.m.Input} Reference to this in order to allow method chaining
getAccessibilityInfo()
See:
{sap.ui.core.Control#getAccessibilityInfo}
getDescription(): string
Gets current value of property description.

The description is a text after the input field, e.g. units of measurement, currencies.

Returns:
{string} Value of property description
getFieldWidth(): sap.ui.core.CSSSize
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%.

Returns:
{sap.ui.core.CSSSize} Value of property fieldWidth
getFilterSuggests(): boolean
Gets current value of property filterSuggests.

Defines whether to filter the provided suggestions before showing them to the user.

Default value is true.

Returns:
{boolean} Value of property filterSuggests
getMaxLength(): int
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.

Returns:
{int} Value of property maxLength
getMaxSuggestionWidth(): sap.ui.core.CSSSize
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.

Since:
1.21.1
Returns:
{sap.ui.core.CSSSize} Value of property maxSuggestionWidth
getShowSuggestion(): boolean
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.

Since:
1.16.1
Returns:
{boolean} Value of property showSuggestion
getShowTableSuggestionValueHelp(): boolean
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.

Since:
1.22.1
Returns:
{boolean} Value of property showTableSuggestionValueHelp
getShowValueHelp(): boolean
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.

Since:
1.16
Returns:
{boolean} Value of property showValueHelp
getShowValueStateMessage(): boolean
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

Since:
1.16
Returns:
{boolean} the value of property showValueStateMessage
getStartSuggestion(): int
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. When it's set to 0, suggest event is fired when input with no text gets focus.

Default value is 1.

Since:
1.21.2
Returns:
{int} Value of property startSuggestion
getSuggestionColumns(): sap.m.Column[]
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".

Since:
1.21.1
Returns:
{sap.m.Column[]}
getSuggestionItems(): sap.ui.core.Item[]
Gets content of aggregation suggestionItems.

SuggestItems are the items which will be shown in the suggestion popup. Changing this aggregation (by calling addSuggestionItem, insertSuggestionItem, removeSuggestionItem, removeAllSuggestionItems, destroySuggestionItems) after input is rendered will open/close the suggestion popup. o display suggestions with two text values, it is also possible to add sap.ui.core/ListItems as SuggestionItems (since 1.21.1). For the selected ListItem, only the first value is returned to the input field.

Since:
1.16.1
Returns:
{sap.ui.core.Item[]}
getSuggestionRows(): sap.m.ColumnListItem[]
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 this aggregation is filled, the aggregation suggestionItems will be ignored.

Since:
1.21.1
Returns:
{sap.m.ColumnListItem[]}
getType(): sap.m.InputType
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.

Returns:
{sap.m.InputType} Value of property type
getValueHelpOnly(): boolean
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.

Since:
1.21.0
Returns:
{boolean} Value of property valueHelpOnly
getValueLiveUpdate(): boolean
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).

Default value is false.

Since:
1.24
Returns:
{boolean} Value of property valueLiveUpdate
getValueStateText(): string
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

Since:
1.16
Returns:
{string} the value of property valueStateText
getWidth(): string
Returns the width of the input.
Returns:
{string} The current width or 100% as default
indexOfSuggestionColumn(oSuggestionColumn): int
Checks for the provided sap.m.Column in the aggregation suggestionColumns. and returns its index if found or -1 otherwise.
Parameters:
{sap.m.Column}oSuggestionColumn The suggestionColumn whose index is looked for
Since:
1.21.1
Returns:
{int} The index of the provided control in the aggregation if found, or -1 otherwise
indexOfSuggestionItem(oSuggestionItem): int
Checks for the provided sap.ui.core.Item in the aggregation suggestionItems. and returns its index if found or -1 otherwise.
Parameters:
{sap.ui.core.Item}oSuggestionItem The suggestionItem whose index is looked for
Since:
1.16.1
Returns:
{int} The index of the provided control in the aggregation if found, or -1 otherwise
indexOfSuggestionRow(oSuggestionRow): int
Checks for the provided sap.m.ColumnListItem in the aggregation suggestionRows. and returns its index if found or -1 otherwise.
Parameters:
{sap.m.ColumnListItem}oSuggestionRow The suggestionRow whose index is looked for
Since:
1.21.1
Returns:
{int} The index of the provided control in the aggregation if found, or -1 otherwise
insertSuggestionColumn(oSuggestionColumn, iIndex): sap.m.Input
Inserts a suggestionColumn into the aggregation suggestionColumns.
Parameters:
{sap.m.Column}oSuggestionColumn the suggestionColumn to insert; if empty, nothing is inserted
{int}iIndex the 0-based index the suggestionColumn should be inserted at; for a negative value of iIndex, the suggestionColumn is inserted at position 0; for a value greater than the current size of the aggregation, the suggestionColumn is inserted at the last position
Since:
1.21.1
Returns:
{sap.m.Input} Reference to this in order to allow method chaining
insertSuggestionItem(oSuggestionItem, iIndex): sap.m.Input
Inserts a suggestionItem into the aggregation suggestionItems.
Parameters:
{sap.ui.core.Item}oSuggestionItem the suggestionItem to insert; if empty, nothing is inserted
{int}iIndex the 0-based index the suggestionItem should be inserted at; for a negative value of iIndex, the suggestionItem is inserted at position 0; for a value greater than the current size of the aggregation, the suggestionItem is inserted at the last position
Since:
1.16.1
Returns:
{sap.m.Input} Reference to this in order to allow method chaining
insertSuggestionRow(oSuggestionRow, iIndex): sap.m.Input
Inserts a suggestionRow into the aggregation suggestionRows.
Parameters:
{sap.m.ColumnListItem}oSuggestionRow the suggestionRow to insert; if empty, nothing is inserted
{int}iIndex the 0-based index the suggestionRow should be inserted at; for a negative value of iIndex, the suggestionRow is inserted at position 0; for a value greater than the current size of the aggregation, the suggestionRow is inserted at the last position
Since:
1.21.1
Returns:
{sap.m.Input} Reference to this in order to allow method chaining
ontap(oEvent)
Fire valueHelpRequest event on tap
Parameters:
{jQuery.Event}oEvent
removeAllSuggestionColumns(): sap.m.Column[]
Removes all the controls from the aggregation suggestionColumns.

Additionally, it unregisters them from the hosting UIArea.

Since:
1.21.1
Returns:
{sap.m.Column[]} An array of the removed elements (might be empty)
removeAllSuggestionItems(): sap.ui.core.Item[]
Removes all the controls from the aggregation suggestionItems.

Additionally, it unregisters them from the hosting UIArea.

Since:
1.16.1
Returns:
{sap.ui.core.Item[]} An array of the removed elements (might be empty)
removeAllSuggestionRows(): sap.m.ColumnListItem[]
Removes all the controls from the aggregation suggestionRows.

Additionally, it unregisters them from the hosting UIArea.

Since:
1.21.1
Returns:
{sap.m.ColumnListItem[]} An array of the removed elements (might be empty)
removeSuggestionColumn(vSuggestionColumn): sap.m.Column
Removes a suggestionColumn from the aggregation suggestionColumns.
Parameters:
{int|string|sap.m.Column}vSuggestionColumn The suggestionColumnto remove or its index or id
Since:
1.21.1
Returns:
{sap.m.Column} The removed suggestionColumn or null
removeSuggestionItem(vSuggestionItem): sap.ui.core.Item
Removes a suggestionItem from the aggregation suggestionItems.
Parameters:
{int|string|sap.ui.core.Item}vSuggestionItem The suggestionItemto remove or its index or id
Since:
1.16.1
Returns:
{sap.ui.core.Item} The removed suggestionItem or null
removeSuggestionRow(vSuggestionRow): sap.m.ColumnListItem
Removes a suggestionRow from the aggregation suggestionRows.
Parameters:
{int|string|sap.m.ColumnListItem}vSuggestionRow The suggestionRowto remove or its index or id
Since:
1.21.1
Returns:
{sap.m.ColumnListItem} The removed suggestionRow or null
setDescription(sDescription): sap.m.Input
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.

Parameters:
{string}sDescription New value for property description
Returns:
{sap.m.Input} Reference to this in order to allow method chaining
setFieldWidth(sFieldWidth): sap.m.Input
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%.

Parameters:
{sap.ui.core.CSSSize}sFieldWidth New value for property fieldWidth
Returns:
{sap.m.Input} Reference to this in order to allow method chaining
setFilterFunction(fnFilter): sap.m.Input
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.
Parameters:
{function}fnFilter 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.
Since:
1.16.1
Returns:
{sap.m.Input} this pointer for chaining
setFilterSuggests(bFilterSuggests): sap.m.Input
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.

Parameters:
{boolean}bFilterSuggests New value for property filterSuggests
Returns:
{sap.m.Input} Reference to this in order to allow method chaining
setMaxLength(iMaxLength): sap.m.Input
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.

Parameters:
{int}iMaxLength New value for property maxLength
Returns:
{sap.m.Input} Reference to this in order to allow method chaining
setMaxSuggestionWidth(sMaxSuggestionWidth): sap.m.Input
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.

Parameters:
{sap.ui.core.CSSSize}sMaxSuggestionWidth New value for property maxSuggestionWidth
Since:
1.21.1
Returns:
{sap.m.Input} Reference to this in order to allow method chaining
setRowResultFunction(fnFilter): sap.m.Input
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.
Parameters:
{function}fnFilter 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.
Since:
1.21.1
Returns:
{sap.m.Input} this pointer for chaining
setShowSuggestion(bShowSuggestion): sap.m.Input
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.

Parameters:
{boolean}bShowSuggestion New value for property showSuggestion
Since:
1.16.1
Returns:
{sap.m.Input} Reference to this in order to allow method chaining
setShowTableSuggestionValueHelp(bShowTableSuggestionValueHelp): sap.m.Input
Sets a new value for 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.

When called with a value of null or undefined, the default value of the property will be restored.

Default value is true.

Parameters:
{boolean}bShowTableSuggestionValueHelp New value for property showTableSuggestionValueHelp
Since:
1.22.1
Returns:
{sap.m.Input} Reference to this in order to allow method chaining
setShowValueHelp(bShowValueHelp): sap.m.Input
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.

Parameters:
{boolean}bShowValueHelp New value for property showValueHelp
Since:
1.16
Returns:
{sap.m.Input} Reference to this in order to allow method chaining
setShowValueStateMessage(bShowValueStateMessage): sap.m.InputBase
Setter for property showValueStateMessage.

Default value is true

Parameters:
{boolean}bShowValueStateMessage new value for property showValueStateMessage
Since:
1.16
Returns:
{sap.m.InputBase}this to allow method chaining
setStartSuggestion(iStartSuggestion): sap.m.Input
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. When it's set to 0, suggest event is fired when input with no text gets focus.

When called with a value of null or undefined, the default value of the property will be restored.

Default value is 1.

Parameters:
{int}iStartSuggestion New value for property startSuggestion
Since:
1.21.2
Returns:
{sap.m.Input} Reference to this in order to allow method chaining
setType(sType): sap.m.Input
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.

Parameters:
{sap.m.InputType}sType New value for property type
Returns:
{sap.m.Input} Reference to this in order to allow method chaining
setValue(sValue): sap.m.Input
Setter for property value.

Default value is empty/undefined.

Parameters:
{string}sValue New value for property value.
Returns:
{sap.m.Input}this to allow method chaining.
setValueHelpOnly(bValueHelpOnly): sap.m.Input
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.

Parameters:
{boolean}bValueHelpOnly New value for property valueHelpOnly
Since:
1.21.0
Returns:
{sap.m.Input} Reference to this in order to allow method chaining
setValueLiveUpdate(bValueLiveUpdate): sap.m.Input
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).

When called with a value of null or undefined, the default value of the property will be restored.

Default value is false.

Parameters:
{boolean}bValueLiveUpdate New value for property valueLiveUpdate
Since:
1.24
Returns:
{sap.m.Input} Reference to this in order to allow method chaining
setValueStateText(sValueStateText): sap.m.InputBase
Setter for property valueStateText.

Default value is empty/undefined

Parameters:
{string}sValueStateText new value for property valueStateText
Since:
1.16
Returns:
{sap.m.InputBase}this to allow method chaining
setWidth(sWidth)
Defines the width of the input. Default value is 100%
Parameters:
{string}sWidth
unbindSuggestionColumns(): sap.m.Input
Unbinds aggregation suggestionColumns from model data.
Since:
1.21.1
Returns:
{sap.m.Input} Reference to this in order to allow method chaining
unbindSuggestionRows(): sap.m.Input
Unbinds aggregation suggestionRows from model data.
Since:
1.21.1
Returns:
{sap.m.Input} Reference to this in order to allow method chaining
getDateFormat(): string
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.

Deprecated:
Since version 1.9.1. sap.m.DatePicker, sap.m.TimePicher or sap.m.DateTimePicker should be used for date/time inputs and formating.
Returns:
{string} Value of property dateFormat
setDateFormat(sDateFormat): sap.m.Input
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.

Parameters:
{string}sDateFormat New value for property dateFormat
Deprecated:
Since version 1.9.1. sap.m.DatePicker, sap.m.TimePicher or sap.m.DateTimePicker should be used for date/time inputs and formating.
Returns:
{sap.m.Input} Reference to this in order to allow method chaining