Use the ui:textArea tag to create a multiple-line
input field for text.
HTML Elements and Layout
The textArea component renders an HTML <textarea> element.
Configuring the ui:textArea Tag
Use the text attribute to associate
the component with a model object that represents the current value,
by setting the attribute's value to a JavaServer Faces EL expression
that evaluates to a backing bean or a backing bean property.
To optionally specify a label for the component, use the
label attribute, or specify a label facet.
Facets
label : use this facet to specify a custom
component for the label.
readOnly : use this facet to specify a custom
component for displaying the readOnly value of this component.
Theme Identifiers
The input element has a style class "TxtAra", or "TxtAraDis"
when the field is disabled. If a label attribute is specified, the
label element's class attribute is set to "LstAln" followed by
"LblLvl1Txt", "LblLvl2Txt" or "LblLvl3Txt" depending on the label
level.
Client-side JavaScript functions
In all the functions below, <id> should be
the generated id of the TextArea component.
field_setDisabled(<id>, <disabled>)
|
Enable/disable the field. Set <disabled>
to true to disable the component, or false to enable it.
|
field_setValue(<id>, <newValue>)
|
Set the value of the field to <newValue> .
|
field_getValue(<id>)
|
Get the value of the field. |
field_getInputElement(<id>) |
Get hold of a reference to the textArea element rendered by this
component.
|
component_setVisible(<id>)
|
Hide or show this component.
|
Examples
This example uses a backing bean FieldTest with a property
string. The tag generates a textarea with a label "Comment:". The
rows and columns attributes have been set, to ensure that the
component has the same size on all browsers.
<ui:textArea id="textarea" type="textarea"
label="Comment:"
text="#{FieldTest.string}"
rows="5" columns="50"/>
Auto-generated component class.
Do NOT modify; all changes
will be lost!
|