Using Text Components
Using Text Components
The form tag represents the UIForm component on the page and encloses all the components
that display or collect data from the user, as shown here:
<h:form>
... other JavaServer Faces tags and other content...
</h:form>
The form tag can also include HTML markup to lay out the components on the page. The form
tag itself does not perform any layout; its purpose is to collect data and to declare attributes that
can be used by other components in the form. A page can include multiple form tags, but only
the values from the form that the user submits will be included in the postback.
Using Text Components
Text components allow users to view and edit text in web applications. The basic kinds of text
components are:
Label, which displays read-only text.
Text field, which allows users to enter text, often to be submitted as part of a form.
Password field, which is one kind of text field that displays a set of characters, such as
asterisks, instead of the password that the user enters.
Text area, which is another kind of text field that allow users to enter multiple lines of text.
shows examples of these text components.
FIGURE 111
A Typical Form
FIGURE 112
Example Text Components
Adding UI Components to a Page Using the HTML Component Tags
The Java EE 5 Tutorial · September 2007
330