Netbeans has that feature, based on an entity class it can generate CRUD. This is what it generates for each entity you choose:
- a stateless session bean that extends AbstractFacade.java
- a JSF session-scoped, managed bean
- a directory containing four Facelets files for CRUD capabilities (Create.xhtml, Edit.xhtml, List.xhtml, and View.xhtml)
also it will generate:
- the AbstractFacade.java class that contains the business logic for creation, retrieval, modification and removal of entity instances
- utility classes used by the JSF managed beans (JsfUtil, PaginationHelper)
- a properties bundle for localized messages, and a corresponding entry in the project's Faces configuration file (A faces-config.xml file is created if one does not already exist.)
- auxiliary web files, including a default stylesheet for rendered components, and a Facelets template file
you'll have to update the generate code to use richfaces.
Here's a tutorial on how to do it: https://netbeans.org/kb/docs/web/jsf20-crud.html