ADF Validation

After adding the objects, right click on an entity object. The entity object Editor: will display the Name, Attributes, Tuning, Java, Validation and etc. Double click on the Validation rule. A box will appear as shown below in Figure1. In the Rules drop-down list, there are four kinds of validators: CompareValidator: This allows you to define the value to which the attribute value should be compared. It also gives you the option to compare with query results or view object attributes. • ListValidator: This allows you to compare the value with a list of values either specified or returned by a SQL query or provided as a view object attribute. • RangeValidator: This allows you the range that the attribute should be in. • MethodValidator: This allows you to define the method that will do the validation.

In this tutorial, we will be using the RangeValidator.
1. Select the RangeValidator. When you do, the application will automatically default the Attribute: the object you are editing and the Operator will default to between. 2. In this case, I set the Minimum Value to 10 and the Maximum Value to 1000.

Figure 1.

1

3. Hit OK. After setting Minimum and Maximum value. Now.cis. A window will display the following in figure2. 4. Figure 2.edu:1521:ORACLE. by right-clicking on AppModule.ksu. 2 . See Figure 3 the Figure 3. Connect to the database with oracle:thin@oracle.

Joanna Gonzales. Once the connection has been successful to the database. Again.5. which is correct. I entered a 9 and received the following error. 6. No error message will display. Figure 5. Figure 4. Fall 2004 3 . Now. Figure4 will be displayed. when a value is between the validation that is specified. we can test the validation between 10 – 1000. See Figure 5. It is the running application.