public class Textarea extends AbstractField
Modifier and Type | Field and Description |
---|---|
private static long |
serialVersionUID
The class' serialization version id.
|
private static java.lang.String |
TEXTAREA
The pattern used to create the html for a textarea form field.
|
PARAM
ivHashCode, ivHashFlds, ivObjAttrs
Constructor and Description |
---|
Textarea(java.lang.String name)
Constructs a new instance of
Textarea using the supplied
parameters. |
Textarea(java.lang.String name,
int rows,
int cols)
Constructs a new instance of
Textarea using the supplied
parameters. |
Textarea(java.lang.String name,
int rows,
int cols,
java.lang.String value)
Constructs a new instance of
Textarea using the supplied
parameters. |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj)
Compares the given object to this object and determines if the two are
equal.
|
protected java.lang.String |
formatAttr(java.lang.String attr)
Returns a formatted html string for the requested attribute value.
|
int |
getColumns()
Returns the textarea's columns attribute.
|
java.lang.String |
getOnChange()
Returns the textarea's onchange event handler attribute.
|
boolean |
getReadOnly()
Returns the textarea's readonly state attribute.
|
int |
getRows()
Returns the textarea's rows attribute.
|
java.lang.String |
getValue()
Returns the textarea's value attribute.
|
boolean |
getWrap()
Returns the textarea's wrap state attribute.
|
void |
setColumns(int columns)
Sets the textarea's columns attribute.
|
void |
setOnChange(java.lang.String onchange)
Sets the textarea's onchange event handler attribute.
|
void |
setReadOnly(boolean readonly)
Sets the textarea's readonly state attribute.
|
void |
setRows(int rows)
Sets the textarea's rows attribute.
|
void |
setValue(java.lang.String value)
Sets the textarea's value attribute.
|
void |
setValueHS(java.lang.String value)
Sets the textarea's value attribute.
|
void |
setWrap(boolean wrap)
Sets the textarea's wrap state attribute.
|
java.lang.String |
toHTML()
Returns a formatted html string for the textarea's current attribute
values.
|
getDisabled, getId, getName, getOnBlur, getOnClick, getOnDblClick, getOnFocus, getOnKeyDown, getOnKeyPress, getOnKeyUp, getOnMouseOut, getOnMouseOver, getStyleCls, getStyleStr, setDisabled, setId, setName, setOnBlur, setOnClick, setOnDblClick, setOnFocus, setOnKeyDown, setOnKeyPress, setOnKeyUp, setOnMouseOut, setOnMouseOver, setStyleCls, setStyleStr
cloneMapAttributes, formatValue, formatValue, getHashFields, getMapArrayList, getMapAttributes, getMapBigDecimal, getMapBoolean, getMapDate, getMapDouble, getMapInteger, getMapLong, getMapMapped, getMapObject, getMapShort, getMapString, getMapString, getMapStringBuffer, getMapStringBuilder, getMapTime, getMapTimestamp, getMapVector, hashCode, setHashFields, setMap, setMap, setMap, setMap, setMap, setMap, setMap, setMap, setMap, setMap, setMap, setMap, setMap, setMap, setMap, setMapAttributes, setMapObject, setMapTime, setMapTimestamp, toStringArray
private static final long serialVersionUID
private static final java.lang.String TEXTAREA
public Textarea(java.lang.String name)
Textarea
using the supplied
parameters. Defaults the rows to "1", columns to "1", the text value
to an empty string and wrapping to "true".name
- (String) The form field name for the textarea.public Textarea(java.lang.String name, int rows, int cols)
Textarea
using the supplied
parameters. Defaults the text value to an empty string and wrapping to
"true".name
- (String) The form field name for the textarea.rows
- (int) The number of rows for the textarea.cols
- (int) The number of columns for the textarea.public Textarea(java.lang.String name, int rows, int cols, java.lang.String value)
Textarea
using the supplied
parameters. Defaults wrapping to "true".name
- (String) The form field name for the textarea.rows
- (int) The number of rows for the textarea.cols
- (int) The number of columns for the textarea.value
- (String) The text value to display. The supplied value
is auto-encoded for html safe characters. To construct a field
with text that is already html safe, set this value to an empty
string and then use the setValueHS() method to set the html safe
text value.public boolean equals(java.lang.Object obj)
equals
in class MappedAttributesObject
obj
- (Object) The object to compare with this object.true
if the specified object is equal to
this object, otherwise false
.protected java.lang.String formatAttr(java.lang.String attr)
formatAttr
in AbstractField
.formatAttr
in class AbstractField
AbstractField.formatAttr(java.lang.String)
public java.lang.String toHTML()
toHTML
in AbstractField
.toHTML
in class AbstractField
AbstractField.toHTML()
public int getColumns()
public void setColumns(int columns)
columns
- (int) The textarea's columns.public java.lang.String getOnChange()
public void setOnChange(java.lang.String onchange)
onchange
- (String) The textarea's onchange event handler.public boolean getReadOnly()
public void setReadOnly(boolean readonly)
readonly
- (boolean) The textarea's readonly state.public int getRows()
public void setRows(int rows)
rows
- (int) The textarea's rows.public java.lang.String getValue()
public void setValue(java.lang.String value)
value
- (String) The textarea's value. The supplied value is
encoded for html safe characters.public void setValueHS(java.lang.String value)
value
- (String) The textarea's value. The supplied value is
assumed to contain html safe characters. No additional encoding
is done.public boolean getWrap()
public void setWrap(boolean wrap)
wrap
- (boolean) The textarea's wrap state.