In this chapter about JSF forms, we explored the HTML and core JSF custom tags to build the answer to one of the most sought-after questions on the Internet: how on earth do I—as a digital developer—write a CRUD application? It is surprising that this simple idea is considered difficult to program.
We built a digital JSF form that initially created a contact detail. We saw the Facelet view, the managed bean controller, the stateful session EJB, and the entity. We are modern because we took advantage of the recent HTML5 advances such as the Bootstrap CSS framework. We displayed a list collection of objects with a <h:dataTable>
tag, which is a powerful and flexible component. We then added the ability to edit and remove the contact details from the application.
In the next chapter, we will look at form validation extensively and throw in a mix of an AJAX communication in JSF. We have already—sort of—looked in the territory of validation with <f:validateRequired>
, <h:messages...