Document Information

Preface

Part I Introduction

1.  Overview

2.  Using the Tutorial Examples

Part II The Web Tier

3.  Getting Started with Web Applications

4.  Java Servlet Technology

5.  JavaServer Faces Technology

JavaServer Faces Technology Benefits

What Is a JavaServer Faces Application?

User Interface Component Model

User Interface Component Classes

Component Rendering Model

Conversion Model

Event and Listener Model

Validation Model

Navigation Model

Backing Beans

Creating a Backing Bean Class

Configuring a Bean

Using the Unified EL to Reference Backing Beans

The Life Cycle of a JavaServer Faces Page

Restore View Phase

Apply Request Values Phase

Process Validations Phase

Update Model Values Phase

Invoke Application Phase

Render Response Phase

Further Information about JavaServer Faces Technology

6.  Introduction to Facelets

7.  Using JavaServer Faces Technology in Web Pages

8.  Developing with JavaServer Faces Technology

9.  Configuring JavaServer Faces Applications

Part III Web Services

10.  Introduction to Web Services

11.  Building Web Services with JAX-WS

12.  Building RESTful Web Services with JAX-RS and Jersey

Part IV Enterprise Beans

13.  Enterprise Beans

14.  Getting Started with Enterprise Beans

15.  Running the Enterprise Bean Examples

Part V Persistence

16.  Introduction to the Java Persistence API

17.  Running the Persistence Examples

18.  The Java Persistence Query Language

Part VI Security

19.  Introduction to Security in the Java EE Platform

20.  Using Java EE Security

21.  Securing Java EE Applications

22.  Securing Web Applications

Part VII Java EE Supporting Technologies

23.  Introduction to Java EE Supporting Technologies

24.  Transactions

25.  Resource Connections

Index

 

JavaServer Faces Technology User Interface

As shown in Figure 5-1, the user interface that you create with JavaServer Faces technology (represented by myUI in the graphic) runs on the server and renders back to the client.

Figure 5-1 The UI Runs on the Server
Diagram shows a browser accessing myfacelet.xhtml page using an HTTP Request and the server sending the rendered the HTML page using an HTTP Response.

The web page, myfacelet.xhtml, is built with Facelets technology. It expresses the user interface components by using custom tags defined by JavaServer Faces technology. The UI for the web application (represented by myUI in the figure) manages the objects referenced by the web pages. These objects include the following:

  • The UI component objects that map to the tags on the page

  • Any event listeners, validators, and converters that are registered on the components

  • The JavaBeans components that encapsulate the data and application-specific functionality of the components

This chapter provides an overview of JavaServer Faces technology. After going over some of the primary benefits of using JavaServer Faces technology and explaining what a JavaServer Faces application is, it then describes the UI component model, the navigation model, and the backing bean features supported by JavaServer Faces technology. Finally, this chapter describes the life cycle of a JavaServer Faces page.