Book Image

Java EE 7 Development with NetBeans 8

By : David R Heffelfinger
5 (1)
Book Image

Java EE 7 Development with NetBeans 8

5 (1)
By: David R Heffelfinger

Overview of this book

Table of Contents (18 chapters)
Java EE 7 Development with NetBeans 8
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Generating JSF applications from JPA entities


One very nice feature of NetBeans is that it allows us to generate JSF applications that will perform Create, Read, Update, and Delete (CRUD) operations from existing JPA entities. This feature, combined with the ability to create JPA entities from an existing database schema as described in the previous section, allows us to write web applications that interact with a database in record time.

To generate JSF pages from existing JPA entities, we need to right-click on File, select New File, select the JavaServer Faces category, and then select the JSF Pages from Entity Classes file type.

Note

In order to be able to generate JSF pages from existing JPA entities, the current project must be a Web Application project.

After clicking on Next, we need to select one or more JPA entities. We would typically want to select all of them, and they can easily be selected by clicking on the Add All button.

The next page in the wizard allows us to specify a package...