First page Back Continue Last page Text

oracle adf workshop

Notes:


Testing the Global Validation Rule

At run time, an instance of the validator class is instantiated for each usage in each entity object. Its metadata property values are set during metadata load time, and might have different values for each instance of the validator that is used in entity objects.

The validators may be used by multiple threads at the same time. They need to be thread-safe and they should not maintain private state; that is, they should not store data between calls to the validate() method.

To test the rule, invoke the Business Component Browser for the application module containing a view based on the entity where the validation is defined. Change a value so that the validation rule is violated, then tab out of the field for attribute-level validation or commit the record for entity-level validation. This should generate the exception that you defined in the validation rule’s Java class.