Book Image

Oracle ADF Faces Cookbook

By : Amr Ismail Gawish
Book Image

Oracle ADF Faces Cookbook

By: Amr Ismail Gawish

Overview of this book

Table of Contents (18 chapters)
Oracle ADF Faces Cookbook
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Adding validation


The JSF lifecycle provides a validation mechanism that when you add validation to a component and a user edits or enters data in fields and submits the form, the data is validated against any set rules and conditions. If validation fails, the application displays an error message. This entire process happens at the server side.

ADF Faces provides client-side capabilities that can be used inside the component itself or that uses specific validation tags that provides client-side validation and saves a round trip to the server. Attributes such as required and columns can be used to provide another layer of validation that can be used to further instruct the user to enter the right data. ADF also provides multiple validator tags that can be used with input fields to add extra layer of validation.

In this recipe, we will get to know two of these validators in action by applying them on PhoneNumber and Salary attributes in our employees page. You can continue from the previous...