10.12.2012 Views

The Java EE 5 Tutorial (PDF) - Oracle Software Downloads

The Java EE 5 Tutorial (PDF) - Oracle Software Downloads

The Java EE 5 Tutorial (PDF) - Oracle Software Downloads

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

UserNumberBean<br />

<br />

guessNumber.UserNumberBean<br />

<br />

session<br />

<br />

minimum<br />

long<br />

0<br />

<br />

<br />

maximum<br />

long<br />

10<br />

<br />

<br />

This declaration configures UserNumberBean so that its minimum property is initialized to 0, its<br />

maximum property is initialized to 10, and it is added to session scope when it is created.<br />

A page author can use the unified EL to access one of the bean’s properties, like this:<br />

<br />

For more information on configuring beans, see “Configuring a Bean” on page 309.<br />

User Interface Component Model<br />

<strong>Java</strong>Server Faces UI components are configurable, reusable elements that compose the user<br />

interfaces of <strong>Java</strong>Server Faces applications. A component can be simple, such as a button, or<br />

compound, such as a table, which can be composed of multiple components.<br />

<strong>Java</strong>Server Faces technology provides a rich, flexible component architecture that includes the<br />

following:<br />

■ A set of UIComponent classes for specifying the state and behavior of UI components<br />

■ A rendering model that defines how to render the components in various ways<br />

■ An event and listener model that defines how to handle component events<br />

■ A conversion model that defines how to register data converters onto a component<br />

■ A validation model that defines how to register validators onto a component<br />

This section briefly describes each of these pieces of the component architecture.<br />

User Interface Component Model<br />

Chapter 10 • <strong>Java</strong>Server FacesTechnology 297

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!