1


I'm pretty new to PrimeFaces and I'd need to setup a basic CRUD User Interface. From the showcase I can see there is a built-in Datatable parameter named editable to enable editing. I wonder if there is any built-in feature to enable also Adding and Deleting items.
If not, what would be the simplest way to achieve it ? Maybe using a Dialog component to collect the new items ?
Thanks

1 Answer 1

2

The simplest way to get a CRUD would be to reverse engineer it. Create your tables in a database and in Netbeans 7 or 8 (I use 8) create

  1. Entity classes from database
  2. JSF pages from entity classes

During the second point you can choose between Primefaces and plain JSF. If you prefer, you could also skip the first point and code the entity classes yourself instead, and tell the server to create the tables on start.

This will get a full CRUD running, complete with theming, menustructure and templating, using primefaces, facelets, beans, custom entity converters, EJB's, entities and JPA.

I like most of the generated code quite well and there is a lot to learn from it as a beginner. The result is a full page for the list and dialogs (via ui:include's) for create, view and edit.

I'd think Eclipse has something similar.

1
  • Thanks. I'll have a look at it ! Aug 21, 2014 at 9:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.