|
|
|
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>.
<table valign="middle">
<form>
<tr>
<td>Your Comments</td>
<td><textarea jwcid="commentsText" cols="20" rows="5"/></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"/>
</component>
public class CustomerCommentsPage extends BasePage {
private String comments;
public String getComments() { return comments; }
public void setComments(String value) {
comments = value;
fireObservedChange("comments", value);
}
protected void initialize() {
comments = "Please enter your comments here";
}
public void formSubmit(IRequestCycle requestCycle) {
// Proccess customer comments
}
}
|
|