How to Perform Validation through Method in Oracle ADF

In this post we will perform validation through Method in Oracle ADF and for this purpose will continue the previous post example.

In this example we will perform validation on Employee's First Name field and we will restrict the data entry operator to do not leave the first name field empty.

First we will generate and configure Java implementation class for Employee Entity Object. Double click on Employee Entity from model.eo package and Open Java tab. From the Java Classes click on yellow pencil button. From the newly opened window click to generate entity object class and also click to include Accessors. 


Now create the validation for FirstName field. Select Method as Rule Type, Click the Create and Select Method and enter the Name of Method.


Open the Failure Handling tab and type Message text.

Again open the Java tab and click on model.eo.EmployeesImpl class link


The basic structure of the method is already been written and in this structure we will write our required code as shown


Run the AppModule from model.vo package. Open EmployeeView, enter Employee ID, leave the FirstName field empty and press enter. Our method will execute and give the required result as shown


Comments

  1. thankyou so much your blog is superb for beginners in ADF

    ReplyDelete

Post a Comment

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