Summary
In this chapter, we explored how the JBoss Seam framework can be used to create powerful JSF applications using the full Java EE technology stack, including EJB3 session beans, JPA entities, and more. We also saw how to use Seam JSF controls and Hibernate Validator annotations to implement JSF validation for our application efficiently by applying the "DRY" principle. By adding Hibernate Validator annotations to our JPA domain model, we gain a twofold advantage: (a) we can use Hibernate Validator to implement declarative data integrity constraints in our JPA persistence layer, and (b) we can reuse the Hibernate Validator annotations in our domain model to declare user interface validation constraints for our JSF-based presentation layer.
Next, we looked at ways to decorate components in the user interface to enhance JSF validation. We saw how to use the<s:decorate>
tag to reference an external validation template that provides decorations for invalid and required fields. We...