first_page the funky knowledge base
personal notes from way, _way_ back and maybe today

JavaServer Faces in Action Notes: Chapter 2; JSF Fundamentals; 2.2 The Request Processing Lifecycle

2.2 The Request Processing Lifecycle

The Request Processing Lifecycle has 10 parts in six "primary phases": Restore View, Apply Request Values, Process Events, Process Validations, Process Events, Update Model Values, Process Events, Invoke Application, Process Events and Render Response. Note how 'Process Events' occurs multiple times. To avoid this redundancy, see the six-part diagram by IBM in "JSF for nonbelievers: The JSF application lifecycle" here:

http://www-128.ibm.com/developerworks/java/library/j-jsf2/

"After most phases, JSF will broadcast events to any interested listeners (events can be associated with a particular phase)... A listener can even skip the final phase and render a response itself."

"The main idea behind this whole process is that by the time the Invoke Application stage has been reached, there is a fully populated component tree, all validations have been completed, and any backing beans or model objects have been completely updated." It is clear that JSF realizes all of these application-centric concepts 'for free' over a primal HTTP request and response adding most or even all of the abstraction needed to implement a web application.

"Once JSF receives this HTTP request, it creates and populates an instance of javax.faces.context.FacesContext. This class represents the current state of the request..."

mod date: 2007-03-22T23:16:02.000Z