Skip Headers
Oracle® Application Development Framework Developer's Guide For Forms/4GL Developers
10g (10.1.3.1.0)

Part Number B25947-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

20.1 Introduction to Validation and Conversion

In an ADF Business Components application, virtually all validation code is defined in the shared, reusable business domain layer of entity objects. This ensures that your business information is validated consistently in every page where end users are allowed to make changes, and it simplifies maintenance by centralizing validation. For information about configuring the declarative runtime behavior for entity objects, see Section 6.6, "Configuring Declarative Runtime Behavior". For information about specifying and managing declarative validation rules in the entity or attribute level, see Section 6.7, "Using Declarative Validation Rules". For information about extending entity objects with custom code, see Section 9.3, "Using Method Validators".

In the model layer, ADF Model validation rules can be set for the attributes of a collection. In an ADF Business Components application, unless you use data controls other than the application module data controls, you don't need to add ADF Model validation rules.

In the view layer, ADF Faces input components have built-in validation capabilities. You set validation on a UI component either by setting the required attribute or by using one of the built-in ADF Faces validators. ADF applications also have validation capabilities at the model layer, allowing you to set validation on a binding to an attribute. In addition, you can create your own ADF Faces validators to suit your business needs.

ADF Faces input components also have built-in conversion capabilities, which allow users to enter information as Strings, and which the application can automatically convert to another data type, such as Date. Conversely, data stored as something other than a String can be converted to a String for display and updating.

Many components, such as selectInputDate, automatically provide this capability. Other components, such as inputText, automatically add a built-in ADF Faces or JSF reference implementation converter when you drag and drop from the Data Control Palette an attribute that is of a type for which a converter exists.

When validators or converters fail, associated error messages can be displayed to the user. These messages can be displayed in popup dialogs for client-side validation, or they can be displayed on the page itself next to the component whose validation or conversion failed.

Read this chapter to understand: