Class sap.m.TextAreaModule: sap/m/TextArea
The sap.m.TextArea
enables multi-line text input.
Since: 1.9.0.
sClassName
and enriches it with the information contained in oClassInfo
.fnFunction
to the liveChange
event of this sap.m.TextArea
.fnFunction
from the liveChange
event of this sap.m.TextArea
. 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:
- Properties
- rows : int (default: 2)
- cols : int (default: 20)
- height : sap.ui.core.CSSSize
- maxLength : int (default: 0)
- wrapping : sap.ui.core.Wrapping (default: None)
- valueLiveUpdate : boolean (default: false)
- growing : boolean (default: false)
- growingMaxLines : int (default: 0)
- Events
- liveChange : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]
In addition, all settings applicable to the base type sap.m.InputBase can be used as well.
{string} | sId? | ID for the new control, generated automatically if no ID is given |
{object} | mSettings? | Initial settings for the new control |
{sap.ui.base.Event} | oControlEvent | |
{sap.ui.base.EventProvider} | oControlEvent.getSource | |
{object} | oControlEvent.getParameters | |
{string} | oControlEvent.getParameters.value | The new value of the control. |
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.
{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 |
{function} | Created class / constructor function |
{sap.ui.base.Metadata} | Metadata object describing this class |
fnFunction
to the liveChange
event of this sap.m.TextArea
. 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.TextArea
itself.
Is fired whenever the user has modified the text shown on the text area.
{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.TextArea itself |
{sap.m.TextArea} | Reference to this in order to allow method chaining |
fnFunction
from the liveChange
event of this sap.m.TextArea
. The passed function and listener object must match the ones used for event registration.
{function} | fnFunction | The function to be called, when the event occurs |
{object} | oListener | Context object on which the given function had to be called |
{sap.m.TextArea} | Reference to this in order to allow method chaining |
liveChange
to attached listeners. Expects the following event parameters:
value
of typestring
The newvalue
of the control.
{Map} | mArguments? | The arguments to pass along with the event |
{sap.m.TextArea} | Reference to this in order to allow method chaining |
cols
. Defines the visible width of the control, in average character widths. Note: The width
property wins over the cols
property, if both are set.
Default value is 20
.
{int} | Value of property cols |
growing
. Indicates the ability of the control to automatically grow and shrink dynamically with its content. Note: The height
property is ignored, if this property set to true
.
Default value is false
.
- Since:
- 1.38.0
{boolean} | Value of property growing |
growingMaxLines
. Defines the maximum number of lines that the control can grow.
Default value is 0
.
- Since:
- 1.38.0
{int} | Value of property growingMaxLines |
height
. Defines the height of the control.
{sap.ui.core.CSSSize} | Value of property height |
maxLength
. Defines the maximum number of characters that the value
can be.
Default value is 0
.
{int} | Value of property maxLength |
rows
. Defines the number of visible text lines for the control. Note: The height
property wins over the rows
property, if both are set.
Default value is 2
.
{int} | Value of property rows |
value
. Defines the value of the control's input field. Default value is undefined
{string} | the value of property value |
valueLiveUpdate
. Indicates when the value
property gets updated with the user changes. Setting it to true
updates the value
property whenever the user has modified the text shown on the text area.
Default value is false
.
- Since:
- 1.30
{boolean} | Value of property valueLiveUpdate |
wrapping
. Indicates how the control wraps the text, e.g. Soft
, Hard
, Off
.
Default value is None
.
{sap.ui.core.Wrapping} | Value of property wrapping |
cols
. Defines the visible width of the control, in average character widths. Note: The width
property wins over the cols
property, if both are set.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is 20
.
{int} | iCols | New value for property cols |
{sap.m.TextArea} | Reference to this in order to allow method chaining |
growing
. Indicates the ability of the control to automatically grow and shrink dynamically with its content. Note: The height
property is ignored, if this property set to true
.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is false
.
{boolean} | bGrowing | New value for property growing |
- Since:
- 1.38.0
{sap.m.TextArea} | Reference to this in order to allow method chaining |
growingMaxLines
. Defines the maximum number of lines that the control can grow.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is 0
.
{int} | iGrowingMaxLines | New value for property growingMaxLines |
- Since:
- 1.38.0
{sap.m.TextArea} | Reference to this in order to allow method chaining |
height
. Defines the height of the control.
When called with a value of null
or undefined
, the default value of the property will be restored.
{sap.ui.core.CSSSize} | sHeight | New value for property height |
{sap.m.TextArea} | Reference to this in order to allow method chaining |
maxLength
. Defines the maximum number of characters that the value
can be.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is 0
.
{int} | iMaxLength | New value for property maxLength |
{sap.m.TextArea} | Reference to this in order to allow method chaining |
rows
. Defines the number of visible text lines for the control. Note: The height
property wins over the rows
property, if both are set.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is 2
.
{int} | iRows | New value for property rows |
{sap.m.TextArea} | Reference to this in order to allow method chaining |
valueLiveUpdate
. Indicates when the value
property gets updated with the user changes. Setting it to true
updates the value
property whenever the user has modified the text shown on the text area.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is false
.
{boolean} | bValueLiveUpdate | New value for property valueLiveUpdate |
- Since:
- 1.30
{sap.m.TextArea} | Reference to this in order to allow method chaining |
wrapping
. Indicates how the control wraps the text, e.g. Soft
, Hard
, Off
.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is None
.
{sap.ui.core.Wrapping} | sWrapping | New value for property wrapping |
{sap.m.TextArea} | Reference to this in order to allow method chaining |