See Also
You can drag the Standard JavaServer Faces Multi Line Text Area component
from
the Palette to the Visual Designer to provide a text input area
where users can type or paste multiple lines of text. The HTML
equivalent for this component is <textarea>.
- This component is a JavaServer Faces reference implementation that cannot use themes. The Text Area component in the Basic category of the Palette does support themes and provides other features that improve ease of use.
After dragging the component to the Visual Designer, you can do a number of things
with it:
- Change the displayed text of the component by selecting the the component
and typing the new text. Press Enter to save the text in the component's
value property.
- Select the component and
drag it to another location on the page.
- Select the component and edit its properties in the Multi
Line Text Area property
sheet. Some typical properties you might set are:
- id. The name of the Multi Line Text Area component.
In the JSP file, this name is the value of the component's
id attribute. In the page bean, this property's
value is the name of the HtmlInputTextarea object.
- value. The text that the user enters. This text
is sent to the server when the page is submitted. You
can also specify a value to be initially displayed for
this property so the user knows what sort of text to enter,
or you can click the ellipsis button and bind the property
to a database table or object so the property's value
can be set dynamically.
- cols. The width in characters of the text area.
If the user types more characters than will fit, the characters
wrap around to the next row.
- rows. The number of rows of text to display at
one time in the component. The user can scroll up and
down through the text if there are more rows than the
component can display at one time.
- Right-click the component and choose one of the following
pop-up menu items:
- Edit Event Handler. Write code for one of the following event handlers.
- validate. Opens the Java Editor with the cursor positioned in the component's validate method so you can insert code to validate the value of the component.
- processValueChange. Opens the Java Editor with the cursor positioned in the component's processValueChange method so you can insert code that executes when the value of this component changes (for example, the user
changes the value of another component that is controlling
the value of this component).
- Bind to Data. Opens a dialog box that enables you to bind the component's
value property to a data provider or an object so your application can evaluate it when the page is submitted. For more information, see Bind to Data Dialog Box.
- Auto-submit on Change. Causes the form to be automatically submitted if the value of the component changes. Sets the component's JavaScript onclick property to
common_timeoutSubmitForm(this.form, 'component-id');. At runtime, this code causes the form to be automatically submitted if the component value changes. Once the form is submitted, conversion and validation occur on the server and any value change listener methods execute, and then the page is redisplayed.
A component configured to Auto-submit on Change can use virtual forms to limit the input fields that are processed when the form is submitted. If the auto-submit component is defined to submit a virtual form, only the participants in that virtual form will be processed when the auto-submit occurs.
- Configure Virtual Forms. Enables you to add the component to a virtual form.
- Property Bindings. Opens a dialog box that enables you to bind the properties of the component to other objects or properties that supply data for the values of this component's properties.
-
- See Also
- Working
With Components
- Component
Tasks: Quick Reference
- Component
Web Tutorials
- Data
Source Web Tutorials
- About the Palette