Book Image

Mastering JavaServer Faces 2.2

By : Anghel Leonard
Book Image

Mastering JavaServer Faces 2.2

By: Anghel Leonard

Overview of this book

Table of Contents (20 chapters)
Mastering JavaServer Faces 2.2
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
The JSF Life Cycle
Index

A brief overview of the JSF-AJAX lifecycle


AJAX's request-response cycle is characterized by partial processing and partial rendering stages; this means that AJAX partially affects the current view. As such, requests are not typical JSF requests, they follow a different lifecycle dictated by the javax.faces.context.PartialViewContext class. The methods of this class know how to deal with AJAX requests, which means that they are responsible for solving partial processing and rendering of the component tree.

The kernel of an AJAX request is represented by two attributes of the <f:ajax> tag: execute and render. The execute attribute indicates the components that should be processed on the server (partial processing), while the render attribute indicates the components that should be rendered (or re-rendered) on the client (partial rendering).

In the upcoming sections, you will see many examples of how these attributes works.