j2ee_-_jsf_-_mastering_java_server_faces_-_wiley_-_2004

Page 108

CHAPTER

3 JSF Request-Processing Life Cycle

In Chapters 1 and 2, we covered the architecture and design behind JSF in contrast to other similar frameworks. We also introduced the elements of JSF along with some simple examples of what they look like in action. Here, we’ll discover how these elements fit together in the JSF request-processing life cycle. This life cycle is what each JSF application is required to go through when taking a request and then generating an appropriate response back to the client. We’ll deal with how the component tree is constructed and used, how events are processed, how conversions and validations are executed, how the response is generated from rendered components, and much more. Specifically, we’ll cover request-processing scenarios, each step of the requestprocessing life cycle, and some important elements of the FacesContext. This chapter will tie together many of the elements we discussed in the previous chapter and prepare you for more in-depth and advanced topics in the following chapters.

Overview We first got a glimpse of the JSF request-processing life cycle in Chapter 1, “JSF Patterns and Architecture.” The life cycle actually defines the process by which the FacesServlet, JSF’s version of the Controller in MVC, digests a

81


Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.