Friday, May 24, 2013

ADF Business Component Validations

بسم الله الرحمن الرحيم
اللهم علمنا ما ينفعنا وانفعنا بما علمتنا يا رب العالمين
---------------

This framework provides very good feature of validation. In ADF we can validate user inputs at different levels. Which are
  • Attribute level: Fires on value change.
  • Entity level: Fires on moving from one record to another. 
  • Transaction level: Fires after attribute and entity level validations are complete. It validates Master-detail validations.

These validations are defined in Entity object and View object level. There are many rules of possible validations and ADF-BC provide lots of them. These validations rules are: 
  • Compare: Attribute value compared with other attribute's value or an expression or a literal.
  • List: Value is validated against a list of values.
  • Key Exists: Its like a foreign key validator, it checks the value whether it exists or not. Like value for employee will check for the department to check whether it is present or not.
  • Regular Expressions: Value compared against provided regular expression. Like for email validation, Number Format validation.
  • Script Expression: Groovy expression are used to do validations.
  • Method Validator: When a method validator is created it adds a method in corresponding entityImpl calss. Like 
         public boolean validateEname(String ename) {
         return true;
        }    
والسلام عليكم ورحمته الله وبركاته
<< سبحانك اللهم وبحمدك أشهد أن لا اله الا أنت أستغفرك وأتوب اليك >>

No comments :

Post a Comment

Related Posts Plugin for WordPress, Blogger...