Book Image

Digital Java EE 7 Web Application Development

By : Peter Pilgrim
Book Image

Digital Java EE 7 Web Application Development

By: Peter Pilgrim

Overview of this book

Digital Java EE 7 presents you with an opportunity to master writing great enterprise web software using the Java EE 7 platform with the modern approach to digital service standards. You will first learn about the lifecycle and phases of JavaServer Faces, become completely proficient with different validation models and schemes, and then find out exactly how to apply AJAX validations and requests. Next, you will touch base with JSF in order to understand how relevant CDI scopes work. Later, you’ll discover how to add finesse and pizzazz to your digital work in order to improve the design of your e-commerce application. Finally, you will deep dive into AngularJS development in order to keep pace with other popular choices, such as Backbone and Ember JS. By the end of this thorough guide, you’ll have polished your skills on the Digital Java EE 7 platform and be able to creat exiting web application.
Table of Contents (21 chapters)
Digital Java EE 7 Web Application Development
Credits
About the Author
Acknowledgment
About the Reviewers
www.PacktPub.com
Preface
Index

Validation


There are a two main ways of achieving validation on the server side. One route to follow is through the use of Bean Validation version 1.1 from the Java EE 7 specification, and the other traditional route takes you through JSF validation.

Constraining form content with Bean Validation

Bean Validation is a specification that allows the developers to annotate the POJOs and entity beans and then call a custom validator instance to verify the properties. The validation framework works with Java annotation and thus, the digital engineer can firmly say how a property or even a method is validated.

I devoted an entire chapter to Bean Validation in the Java EE 7 Developer Handbook; nevertheless, I will run through the basics with you here, in this Digital Web Application book. There are several annotations in the Bean Validation 1.1 standard that you can use straightaway. However, if your platform allows or if you decide to add Hibernate Validator, then many more useful validation annotations...