A text editor component that can be bound to any bindable Property. The text editor supports both multiline and single line modes, default is one-line mode.
Since
TextField
extends
AbstractField
it
implements the
com.itmill.toolkit.data.Buffered
interface. A
TextField
is in write-through mode by default, so
com.itmill.toolkit.ui.AbstractField
must be called to enable buffering.
3.0
Inheritance Path. java.lang.Object-> com.itmill.toolkit.ui.AbstractComponent -> com.itmill.toolkit.ui.AbstractField -> com.itmill.toolkit.ui.TextField
Parameters
dataSource
the Property to be edited with this editor
Constructs a new
TextField
that's bound to the
specified
Property
and has no caption.
Parameters
caption
caption
String
for the editor
dataSource
the Property to be edited with this editor
Constructs a new
TextField
that's bound to the
specified
Property
and has the given caption
String
.
Parameters
caption
caption
String
for the editor
text
initial text content of the editor
Constructs a new
TextField
with the given caption and
initial text contents. The editor constructed this way will not be
bound to a Property unless
setPropertyDataSource(com.itmill.toolkit.data.Property)
is called to bind it.
Parameters
the
number of columns for this editor
Gets the number of columns in the editor. If the number of columns is set 0, the actual number of displayed columns is determined implicitly by the adapter.
Parameters
The Format used to format the value.
Get the value formatter of TextField.
Parameters
String Textual representation for null strings.
isNullSettingAllowed()
Get the null-string representation.
The null-valued strings are represented on the user interface by replacing the null value with this string. If the null representation is set null (not 'null' string), painting null value throws exception.
The default value is string 'null'
Parameters
number of explicitly set rows
Gets the number of rows in the editor. If the number of rows is set to 0, the actual number of displayed rows is determined implicitly by the adapter.
Parameters
boolean Should the null-string represenation be allways converted to null-values.
getNullRepresentation()
Is setting nulls with null-string representation allowed.
If this property is true, writing null-representation string to text field allways sets the field value to real null. If this property is false, null setting is not made, but the null values are maintained. Maintenance of null-values is made by only converting the textfield contents to real null, if the text field matches the null-string representation and the current value of the field is null.
By default this setting is false
Parameters
true if the field is used to enter secret information, false otherwise.
Get the secret property on and off. If a field is used to enter secretinformation the information is not echoed to display.
Parameters
true
if the component is in the word-wrap mode,
false
if not
Tests if the editor is in word-wrap mode.
Parameters
number of explicitly set columns
Sets the number of columns in the editor. If the number of columns is set 0, the actual number of displayed columns is determined implicitly by the adapter.
Parameters
The
Format used to format the value. Null disables the formatting.
Get the value formatter of TextField.
Parameters
nullRepresentation
Textual representation for null strings.
setNullSettingAllowed(boolean)
Sets the null-string representation.
The null-valued strings are represented on the user interface by replacing the null value with this string. If the null representation is set null (not 'null' string), painting null value throws exception.
The default value is string 'null'
Parameters
nullSettingAllowed
Should the null-string represenation be allways converted to null-values.
getNullRepresentation()
Set the null conversion mode.
If this property is true, writing null-representation string to text field allways sets the field value to real null. If this property is false, null setting is not made, but the null values are maintained. Maintenance of null-values is made by only converting the textfield contents to real null, if the text field matches the null-string representation and the current value of the field is null.
By default this setting is false
Parameters
the
number of rows for this editor
Sets the number of rows in the editor. If the number of rows is set to 0, the actual number of displayed rows is determined implicitly by the adapter.
Parameters
secret
value specifying if the field is used to enter secret information.
Set the secret property on and off. If a field is used to enter secretinformation the information is not echoed to display.