Perform Field Level Validation in Oracle ADF


We can also define the field level validation at Entity Object Level. The purpose of validation is to validate data before sent to the database. Declarative validation involves following steps:-


1) Add validation
2) Define Validation
3) Set Error Message


In this post we will continue the previous post example and perform validation on Salary Field.


Open the employee entity from model.eo package. From attribute select Salary field, open the Validation Rule tab and click plus sign to Add the Validation.





Select the Compare as Rule Type. From the Rule Definition choose GreaterThan operator and compare with Literal Value. Enter Literal Value to 0.




To set the error message open Failure Handling tab. Choose Error as Validation Failure Severity. Enter the Error Message in Message Text box.




Finally run the AppModule from model.vo package. Open the EmployeeView1, enter -1 in Employee Salary Field and than leave the filed. You will prompt the same validation message as we defined above.




Next we will perform validation through Java method.

Comments

Popular posts from this blog

What is Oracle Integration Cloud Service - ICS?

How to Create Packages in Oracle Database using TOAD for Oracle

How to create a Simple Scheduler Job in Oracle Database using Toad