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

Introduction


Taking input from users is risky, and without the right validation and conversion you won't be able to verify the data entered by users. Validation is understandable, but what is conversion? In order to understand converters, let's get back to the JSF lifecycle.

Any web application stores data of many object types, such as numbers and dates, in the model layer. When this data is viewed in a client browser, the user interface needs to present this data in a manner that can be read or modified by the end user. For instance, when you want to represent a java.util.Date, you need to first convert this object as a text string in the format mm/dd/yyyy. When a user edits this field and submits the form, this string needs to be converted back to the java.util.Date type that is required by the application. After this, the validation can be applied against other rules and conditions. Conversely, data stored as something other than a string type can be converted to a string to display and...