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 |
Returns a metadata object for class sap.m.Input.
Returns:
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 |
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 |
Adds some suggestionRow to the aggregation suggestionRows
.
Parameters:
- 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:
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
Fires event
liveChange
to attached listeners.
Expects the following event parameters:
value
of type string
The 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 |
Fires event
submit
to attached listeners.
Expects the following event parameters:
value
of type string
The 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 |
Fires event
suggest
to attached listeners.
Expects the following event parameters:
suggestValue
of type string
The current value which has been typed in the input.suggestionColumns
of type 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.
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 |
Fires event
suggestionItemSelected
to attached listeners.
Expects the following event parameters:
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 |
Fires event
valueHelpRequest
to attached listeners.
Expects the following event parameters:
fromSuggestions
of type 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.
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 |
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:
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 |
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:
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 |
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:
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:
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:
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:
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:
- 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:
- 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:
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) |
Removes all the controls from the aggregation
suggestionItems
.
Additionally, it unregisters them from the hosting UIArea.
- Since:
- 1.16.1
Returns:
Removes all the controls from the aggregation
suggestionRows
.
Additionally, it unregisters them from the hosting UIArea.
- Since:
- 1.21.1
Returns:
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:
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:
Removes a suggestionRow from the aggregation suggestionRows
.
Parameters:
- Since:
- 1.21.1
Returns:
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 |
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:
Returns:
{sap.m.Input} | Reference to this in order to allow method chaining |
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:
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 |
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:
- Since:
- 1.21.1
Returns:
{sap.m.Input} | Reference to this in order to allow method chaining |
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:
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 |
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 |
Setter for property
showValueStateMessage
.
Default value is true
Parameters:
{boolean} | bShowValueStateMessage | new value for property showValueStateMessage |
- Since:
- 1.16
Returns:
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 |
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:
Returns:
{sap.m.Input} | Reference to this in order to allow method chaining |
Setter for property
value
.
Default value is empty/undefined
.
Parameters:
{string} | sValue | New value for property value . |
Returns:
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 |
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 |
Setter for property
valueStateText
.
Default value is empty/undefined
Parameters:
{string} | sValueStateText | new value for property valueStateText |
- Since:
- 1.16
Returns:
setWidth(sWidth)
Defines the width of the input. Default value is 100%
Parameters:
Unbinds aggregation suggestionColumns
from model data.
- Since:
- 1.21.1
Returns:
{sap.m.Input} | Reference to this in order to allow method chaining |
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 |
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 |