Submit Component Index TextField

TextArea
org.apache.tapestry.form.TextArea
Text Input:
 
Description
Provides a HTML <textarea> form element. This component must be wrapped by a Form component.

Use the HTML "wrap" attribute as an informal parameter to control word wrapping. Wrap attribute values include: "off", "vitual", "physical", "soft" and "hard".

Prior to release 2.2, this component was named Text.

See Also
Form, TextField
Parameters
Name Type Direction Required Default Description
value String in-out no post The text inside the textarea. The parameter is only updated when the the Text component is not disabled.
disabled boolean in no false Controls whether the textarea is active or not. If disabled, then any value that comes up when the form is submitted is ignored. Corresponds to the "disabled" HTML attribute.
columns integer in no   The width of the textarea, in characters. If zero, or unspecified the value is left to the client browser to determine. Corresponds to the "cols" HTML attribute.
rows integer in no   The number of rows in the textarea. If unspecified or zero, then the value is left to the client browser to determine. Corresponds to the "rows" HTML attribute.

Body: removed
Informal parameters: allowed
Reserved parameters: "name"
Examples

The Text component is used in this example eto provide a customer comments feedback <textarea>.

Your Comments

<table valign="middle">
<form>
 <tr>
  <td>Your Comments</td>
  <td><textarea jwcid="commentsText"/></td>
 </tr>
 <tr align="right">
  <td colspan="2"><input type="submit" value="Submit"/></td>
 </tr>
</form>
</table>


<component id="form" type="Form">
    <binding name="listener" expression="listeners.formSubmit"/>
</component>
  
<component id="commentsText" type="TextArea">
    <binding name="value" expression="comments"/>
    <binding name="columns" expression="columns"/>
    <binding name="rows" expression="rows"/>
</component>


public class CustomerCommentsPage extends BasePage {
    private final static String COMMENTS = "Please enter your comments here"; 
    private String comments = COMMENTS;
    private final int column = 20;
    private final int rows = 5;

    public void formSubmit(IRequestCycle requestCycle) {
        // Proccess customer comments
    }

    public String getComments() { return comments; }

    public void setComments(String value) {
        comments = value;
        fireObservedChange("comments", value);
    }

    public int getColumns() { return columns; }

    public int getRows() { return rows; }

    public void detach() {
        comments = COMMENTS;
        super.detach();
    }        
}

Submit Component Index TextField