N.B. This repo is in archive status - please refer to my newer repo quarkus-jsf-panache-recore for a newer take on a simple list-detail site.
This is an example of the classic "list-detail" application written for the web using JSF, EJB3, JPA and DeltaSpike Data.
This implementation of list-detail is used to track members for a small non-profit club, but the basic idea applies anywhere.
Development of this project was inspired by my involvement with the Upper Credit Field Naturalists, where a slightly-enhanced version of this project is actually used for membership management.
To receive updates when functionality is added, please subscribe to my private mailint list for this project, at https://darwinsys.com/mailman/listinfo/clublist We do not sell or rent your emails nor do we send spam. We may send the very-occasional announcement of Java-related publications.
-
Copy config-sample.properties to config.properties, change the name in the orgName property in this file from 'Sample Club' to your organization’s name (keep it short).
-
Set up a JTA datasource in your app server
-
Change persistence.xml from the in-memory H2 to the JTA datasource
-
Setup the deployment as needed (e.g., edit WEB-INF/jboss-web.xml)
-
Container-managed security is already configured, in WEB-INF/web.xml. Just create a user in the role of club_exec in your app server.
-
Deploy (e.g., mvn wildfly:deploy if you use JBoss WildFly).
-
Enjoy!
If you want to be able to send emails to your club, you’ll need some additional configuration, which is under development at the moment.
Here are some things that should be added. Fork this project on GitHub and send pull requests when you get one working!
-
Search with 'Like' method in DS Data
-
Maybe allow members to update their own record (only!) Probably requires moving to app-managed security since you already have a record for each person.
-
"Position" should be a relationship to another Entity, with a dropdown chooser. Note that this will need its own list-detail mechanism to manage the list of Positions!
-
There should be a "Membership Type" (student, senior, couple/family, etc). This should be a relationship to another Entity, with a dropdown (as above).
-
Finish the Mailing List page.
-
Implement the Print Member Badge/Label page.
-
Even though people should not use spreadsheets for database work, you will probably be pressured to implement the "Export" capability. You will need Apache POI for this.
-
Refactor Home object to merge w/ darwinsys-ee EntityHome