UIInput and UIOutput Tags
UIInput and UIOutput Tags
An editable text component in a JavaServer Faces application is represented by a UIInput
component. One example is a text field. A read-only text component in a JavaServer Faces
application is represented by a UIOutput component. One example is a label.
The UIInput and UIOutput components can each be rendered in four ways to display more
specialized text components.
lists all the renderers of UIInput and UIOutput and the
tags that represent the component and renderer combination. Recall from
that the name of a tag is composed of the name of the
component and the name of the renderer. For example, the inputText tag refers to a UIInput
component that is rendered with the Text renderer.
TABLE 113
UIInput
and UIOutput Tags
Component
Renderer
Tag
Function
UIInput
Hidden
inputHidden
Allows a page author to include a hidden variable in a
page
Secret
inputSecret
The standard password field: Accepts one line of text with
no spaces and displays it as a set of asterisks as it is typed
Text
inputText
The standard text field: Accepts a text string of one line
TextArea
inputTextarea
The standard text area: Accepts multiple lines of text
UIOutput
Label
outputLabel
The standard read-only label: Displays a component as a
label for a specified input field
Link
outputLink
Displays an <a href> tag that links to another page
without generating an action event
OutputMessage
outputFormat
Displays a localized message
Text
outputText
Displays a text string of one line
The UIInput component tags support the following tag attributes in addition to those described
at the beginning of
. This list does not include all the attributes supported by the UIInput component tags,
just those that page authors will use most often. Please refer to the html_basic.tld file for the
complete list.
converter
: Identifies a converter that will be used to convert the component's local data. See
for more information on how to use this
attribute.
converterMessage
: Specifies an error message to display when the converter registered on
the component fails.
dir
: Specifies the direction of the text displayed by this component. Acceptable values are
LTR
, meaning left-to-right, and RTL, meaning right-to-left.
label
: Specifies a name that can be used to identify this component in error messages.
Adding UI Components to a Page Using the HTML Component Tags
Chapter 11 · Using JavaServer Faces Technology in JSP Pages
331