10. Validating Input Data

A key value proposition of Seam is to unify EJB3 and JSF component models. Through the unified components, we can use EJB3 entity beans to back data fields in JSF forms and then use EJB3 session beans as JSF UI event handlers. But Seam does much more than that. Seam enables us to develop data components that have UI-related “behaviors.” For instance, the entity beans can have validators that behave like JSF validators.

In this chapter, we cover the Seam enhanced end-to-end validators that take advantage of Hibernate validator annotations on entity beans as well as Seam UI tags (see Section 3.2., “Seam JSF Enhancements”). We refactor the stateful Hello World example to show how to use this Seam feature. The new application ...

Get JBoss® Seam: Simplicity and Power Beyond Java™ EE now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.