Java Reference
In-Depth Information
We are also given the opportunity to specify a folder for the JSF pages to be created.
If we leave this field blank, pages will be created in our project's
Web Pages
folder.
The values of the
Session Bean Package
and
JSF Classes
Package
text fields default to the package where our JPA
entities reside. It is a good idea to modify this default, since
placing the JSF managed beans in a different package separates
the data access layer classes from the user interface and
controller layers of our application.
The wizard also allows us to use two kinds of templates:
Standard JavaServer Faces
or
PrimeFaces
. Selecting
Standard JavaServer Faces
will result in a fairly basic,
standard web application that we can use as the base for our application. Selecting
PrimeFaces
will result in a very elegant web application. For our example, we will
select
PrimeFaces
, but the procedure is nearly identical when selecting
Standard
JavaServer Faces
. We can select the template from the
Choose Templates
dropdown.
Make sure to add the PrimeFaces 4.0 library to the project when
choosing to generate the PrimeFaces templates. Refer to
Chapter 3
,
JSF Component Libraries
, for details.
After clicking on
Finish
, a complete web application that can perform CRUD
operations will be created.