These are customized template files of PrimeFaces to generate JSF pages and their controllers automatically by NetBeans IDE. Original template files in NetBeans 8.2 are put here too to compare what changes are made.
NetBeans is the open source IDE provided by Oracle and represents latest techniques, especially in Java EE area. PrimeFaces is one of the JSF frames officially embedded in NetBeans. Following address is the tutorial about "Generating a JavaServer Faces 2.x CRUD Application from a Database"
Automatic generation of files in MVC model with NetBeans saved many efforts for my Java EE projects. Example, one of my project has 80 database tables. By using wizard "New > Entity Classes from Database", 80 JPA entities files are generated automatically in 1 minutes. Then by using wizard "New > JSF Pages from Entity Classes", 80 JPA session beans, 80 JSF controller beans, 320 JSF files, the language bundle file, and other support files are generated automatically in 5 minutes. The left thing is to modify or extend these files as project requirements.
When default templates are not enough and some modification are common for all automatically generated JSF files, template files need be customized in NetBeans.
In NetBeans IDE, click the menu item "Tools - Templates" as following:
Select template files under "JavaServer Faces - JSF from Entity - PrimeFaces" as following:
Click button "Open in Editor", and replace its contents with the customized file download from this repository.
This file is used to generate all JSF beans automatically by NetBeans when select PrimeFaces template. Following snapshots show the main differences from original file:
differences 1
differences 2
differences 3
The major changes include:
Following snapshot shows the main differences from original file:
The major changes include:
Following snapshots show the generated "Create.xhtml" and "Edit.xhtml" with the customized template:
Following snapshot shows the main differences from original file: differences
The major changes include:
Following snapshot shows the generated "List.xhtml" with the customized templates: