fc.web.forms
Class TextArea

java.lang.Object
  extended by fc.web.forms.Field
      extended by fc.web.forms.AbstractText
          extended by fc.web.forms.TextArea

public final class TextArea
extends AbstractText

A HTML TextArea


Nested Class Summary
static class TextArea.WrapType
          From the HTML spec:
OFF disables word wrap.
 
Nested classes/interfaces inherited from class fc.web.forms.Field
Field.Type
 
Constructor Summary
TextArea(String name)
          Creates a new textarea element with a initial value of "" (the empty string).
TextArea(String name, int rows, int cols)
          Creates a new textarea element with a initial value of "" and the specified rows/cols.
TextArea(String name, String value)
          Creates a new text element with the specified initial value.
TextArea(String name, String value, int rows, int cols)
          Creates a new text element with the specified initial value and rows/cols.
 
Method Summary
 Field.Type getType()
          Subclasses should return an appropriate Field.Type.
 void renderImpl(FormData fd, Writer writer)
           
 TextArea setCols(int cols)
          This value (if set) is rendered as the html COLS tag.
 TextArea setRows(int rows)
          This value (if set) is rendered as the html ROWS tag.
 TextArea setWrap(TextArea.WrapType wrap)
          Sets the wrapping mode of this text box.
 
Methods inherited from class fc.web.forms.AbstractText
getBooleanValue, getDoubleValue, getFloatValue, getIntValue, getShortValue, getStringValue, getValue, isFilled, reset, setValue, setValue, setValueFromSubmit, toString, trimValues
 
Methods inherited from class fc.web.forms.Field
add, addError, addLabel, addString, disable, disable, enable, enable, getLabel, getName, getValidateErrors, isEnabled, render, render, render, renderError, renderError, renderStyleTag, setStyleTag, validate
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TextArea

public TextArea(String name)
Creates a new textarea element with a initial value of "" (the empty string). No initial rows/cols are specified which will have the effect of rendering this field with the browsers default.


TextArea

public TextArea(String name,
                int rows,
                int cols)
Creates a new textarea element with a initial value of "" and the specified rows/cols.


TextArea

public TextArea(String name,
                String value)
Creates a new text element with the specified initial value. If the specified value is null, then the initial value is set to "" (the empty string)


TextArea

public TextArea(String name,
                String value,
                int rows,
                int cols)
Creates a new text element with the specified initial value and rows/cols.

Method Detail

getType

public Field.Type getType()
Description copied from class: Field
Subclasses should return an appropriate Field.Type. This type is rendered as part of <input type= ...

Specified by:
getType in class Field

renderImpl

public void renderImpl(FormData fd,
                       Writer writer)
                throws IOException
Specified by:
renderImpl in class Field
Throws:
IOException

setCols

public TextArea setCols(int cols)
This value (if set) is rendered as the html COLS tag.

Returns:
this object for method chaining convenience

setRows

public TextArea setRows(int rows)
This value (if set) is rendered as the html ROWS tag.

Returns:
this object for method chaining convenience

setWrap

public TextArea setWrap(TextArea.WrapType wrap)
Sets the wrapping mode of this text box. This value (if set) is rendered as the html WRAP tag. By default the wrap value is not set (and hence not rendered).

Returns:
this object for method chaining convenience