Java Reference
In-Depth Information
As mentioned, the MVC architecture dictates that an application should separate the content (i.e., the model),
controller, and presentation functions (i.e., the view). JSF applications implement the model as Java beans that are
subclasses of PageCodeBase . The class PageCode Base is an example of the new technology that comes with JSF.
Further, the controller function is not coded in a Servlet or JSP in a JSF application, instead, the controller function
is defined as a set of Navigation Rules and implemented using XML. The view is made up of Facelets (Web pages
that use JSF visual components) and/or Web pages. As always, RAD's Page Designer helps the programmer build the
presentation layer (i.e., the GUI) quickly and, in the case of JSF, automatically generates the model component (the
pagecode classes) associated with each Facelet.
There are also a new set of components called SDO (Service Data Objects) that provide easy access to databases.
RAD allows programmers to combine SDO with JSF visual components to provide data manipulation functions with
a minimum of coding. The JSF framework also includes specialized tags for defining and using JSF components.
Tutorial: Creating a JSF Project
Facelets must be created in Dynamic Web Projects that are configured to support JSF. Once a project is created,
a Facelet is created with a wizard (just as you have done before). To build the Facelet in Page Designer, drag and drop
JSF components from the Palette onto it (just as you dragged and dropped AWT, Swing, and HTML components onto
frames, JSPs, and Web pages).
Begin creating a new Dynamic Web Project by clicking File , New , and then
Dynamic Web Project .
1.
2.
Specify TutorialsJSF as the project name, change the Configuration to JavaServerFaces v2.0
Project and then click the Modify button (see Figure 12-1 ).
Figure 12-1.
 
Search WWH ::




Custom Search