HTML and CSS Reference
■ JSr 344 is the JSF 2.2 specification; you can read its early draft review at
Throughout the topic's chapters, we will discuss these features in more details using practical, easy-to-follow
JSF architecture is based on the MVC (Model View Controller) 2 pattern. Unlike the MVC1 pattern, the MVC2 pattern
decouples the view from the controller from the model. Figure 1-2 shows the JSF MVC2 architecture.
Figure 1-2. The JSF MVC2 architecture
In JSF, the MVC2 pattern is fulfilled as follows:
Controller , which is represented by the JSF Faces Servlet . The Faces Servlet is responsible
for handling the request dispatching and the pages navigation. The Faces Servlet orchestrates
the JSF life cycle by invoking the JSF Lifecycle object that is responsible for handling the JSF
request processing life cycle.
Model , which is represented by the JSF managed beans and the back-end code. The JSF
managed bean is simply a POJO that conforms to the JavaBeans naming conventions and can
be accessed from the JSF application (pages and other managed beans). A JSF managed bean
must have a scope that controls its life span; it can be in the request , view , flow , session ,
application , or none scope. Every JSF managed bean should to be registered in the
faces-config.xml (the JSF configuration file) or registered using annotations (managed
beans will be covered in detail in Chapter 2).
Search WWH ::