Validation options:
Business services:
ADF BC
Metadata (declarative validation)
Java (programmatic validation)
Database (PL/SQL)
User interface
In error messages:
You indicate a variable
by surrounding a name
with braces {}
Message tokens are
added automatically
You provide message
token expressions:
source.hints.
<attr>.label for
labels
<attr> for values
Defining an
attribute-level
List validator
2. Operator
Entity-level
Compare validator
3. Value to
compare
with
Value(s):
Qualifier(s):
Predefined Expressions:
Method validators:
Extend declarative rules for entities or attributes
Call Java methods in your entity object (not in a separate
class as a global rule is)
Are called automatically during validation cycle
Must:
Be defined as public boolean validateOrder(){
public if( // add your validation code )
Return a Boolean return true;
else
value return false;
Be named like }
validateXXX()
Select the
global rule
from
the Rule
Type list.
Create a new validator for an
attribute or for the entity.
Provide
values for
any
properties.
JDeveloper Debugger is
useful for pinpointing
problems in your custom
validation code.
Set source breakpoints to
pinpoint problems.
Set exception breakpoints
to stop when a particular exception
is thrown.
At breakpoints you can execute code one line at a time
and view variable values.
To run a file in debug mode, right-click and select Debug.
Domains are Java classes that extend the basic data types
(String, Number, Date , and so on).
You can create your own data types that encapsulate
specific validation rules.
Use domains for more complex validation:
Format of a phone number
Validity of a URL
Validity of an email address
Checksum of digits of a credit card number
Validation is done by the domain constructor.
A domain is not bound to a particular entity or attribute.
URLDomain
appears in the
list of types.