background image

User Interface Component Classes

<< User Interface Component Model | Component Rendering Model >>
<< User Interface Component Model | Component Rendering Model >>

User Interface Component Classes

User Interface Component Classes
JavaServer Faces technology provides a set of UI component classes and associated behavioral
interfaces that specify all the UI component functionality, such as holding component state,
maintaining a reference to objects, and driving event handling and rendering for a set of
standard components.
The component classes are completely extensible, allowing component writers to create their
own custom components. See
Chapter 13, "Creating Custom UI Components"
for an example
of a custom image map component.
All JavaServer Faces UI component classes extend UIComponentBase, which defines the default
state and behavior of a UI component. The following set of UI component classes is included
with JavaServer Faces technology:
UIColumn
: Represents a single column of data in a UIData component.
UICommand
: Represents a control that fires actions when activated.
UIData
: Represents a data binding to a collection of data represented by a DataModel
instance.
UIForm
: Encapsulates a group of controls that submit data to the application. This
component is analogous to the form tag in HTML.
UIGraphic
: Displays an image.
UIInput
: Takes data input from a user. This class is a subclass of UIOutput.
UIMessage
: Displays a localized message.
UIMessages
: Displays a set of localized messages.
UIOutput
: Displays data output on a page.
UIPanel
: Manages the layout of its child components.
UIParameter
: Represents substitution parameters.
UISelectBoolean
: Allows a user to set a boolean value on a control by selecting or
deselecting it. This class is a subclass of UIInput.
UISelectItem
: Represents a single item in a set of items.
UISelectItems
: Represents an entire set of items.
UISelectMany
: Allows a user to select multiple items from a group of items. This class is a
subclass of UIInput.
UISelectOne
: Allows a user to select one item from a group of items. This class is a subclass
of UIInput.
UIViewRoot
: Represents the root of the component tree.
In addition to extending UIComponentBase, the component classes also implement one or more
behavioral interfaces, each of which defines certain behavior for a set of components whose
classes implement the interface.
User Interface Component Model
The Java EE 5 Tutorial · September 2007
300