O'Reilly logo

PrimeFaces Beginner's Guide by K. Siva Prasad Reddy

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using the CSV framework with the Bean Validation API

The Bean Validation API simplifies the data validation process using metadata constraint annotations on Java beans. The Bean Validation API also supports XML-based constraint definitions, but many prefer annotations due to its ease of use. The Bean Validation API provides most of the commonly used constraints and we can create our own custom validators also, if required.

JSF provides out-of-the-box integration with the Bean Validation API, which means instead of specifying the validations inside facelets pages, we can define the validation constraints on Java beans. When you submit the form, if there are any violations to the metadata constraints, those errors will be displayed as FacesMessages ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required