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.  JavaServerTM Faces Technology

5.  Introduction to Facelets

6.  Unified Expression Language

Setting Up a Page

Adding Components to a Page Using HTML Tags

Common Component Tag Attributes

The id Attribute

The immediate Attribute

The rendered Attribute

The style and styleClass Attributes

The value and binding Attributes

Adding HTML Head and Body Tags

Adding a Form Component

Using Text Components

Rendering a Text Field With the inputText Tag

Rendering a Password Field With the inputSecret Tag

Rendering a Label With the outputLabel Tag

Rendering a Hyperlink With the h:outputLink Tag

Displaying a Formatted Message With the h:outputFormat Tag

Using Command Components for Performing Actions and Navigation

Rendering a Button With the h:commandButton Tag

Rendering a Hyperlink With the h:commandLink Tag

Adding Graphics and Images With the h:graphicImage Tag

Laying Out Components With the Panel Component

Displaying Components for Selecting One Value

Displaying a Check Box Using the h:selectBooleanCheckbox Tag

Displaying a Menu Using the h:selectOneMenu Tag

Rendering Components for Selecting Multiple Values

Using The SelectItem and SelectItems Components

Using the f:selectItems Tag

Using the f:selectItem Tag

Using Data-Bound Table Components

Displaying Error Messages With the h:message and h:messages Tags

Creating Bookmarkable URLs with h:button and h:link Tags

Using View Parameters

Resource Relocation using h:output Tags

Using Core Tags

8.  Using Converters, Listeners and Validators

9.  Developing With JavaServerTM Faces Technology

10.  Java Servlet Technology

Part III Web Services

11.  Introduction to Web Services

12.  Building Web Services with JAX-WS

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

Part IV Enterprise Beans

14.  Enterprise Beans

15.  Getting Started with Enterprise Beans

16.  Running the Enterprise Bean Examples

Part V Contexts and Dependency Injection for the JavaTM EE Platform

17.  Introduction to Contexts and Dependency Injection for the JavaTM EE Platform

18.  Running the Basic Contexts and Dependency Injection Examples

Part VI Persistence

19.  Introduction to the Java Persistence API

20.  Running the Persistence Examples

21.  The Java Persistence Query Language

22.  Creating Queries Using the Criteria API

Part VII Security

23.  Introduction to Security in the Java EE Platform

24.  Getting Started Securing Enterprise Applications

25.  Getting Started Securing Web Applications

Part VIII JavaTM EE Supporting Technologies

26.  Introduction to JavaTM EE Supporting Technologies

27.  Transactions

28.  Resource Connections

Index

 

Chapter 7

Using JavaServerTM Faces Technology in Web Pages

Web pages represent the presentation layer for web applications. The process of creating web pages of a JavaServer Faces application includes tasks such as adding components to the page and wiring them to backing beans, validators, converters, and other server-side objects that are associated with the page.

This chapter explains how to create web pages using different types of component and core tags. In the next chapter you will learn about adding converters, validators and listeners to component tags that will provide additional functionality to components.

The following topics are addressed here: