Yearly Archives: 2018

Validate field using Query Result

Sometimes we need to validate field from list of values return from SQL query. ADF framework offers to built-in functionality for that. Here I’m using Hr Schema’s Employees table.   Select JobId Attribute in Employees entity and go to validation tab. Then click on “Green Plus” icon to add new validation rule on attribute. On Dialog window select Type=Compare Operator=Equals ... Read More »

Validate field using Regular Expression

ADF support Regular Expression to validate user input. It’s very helpful to validate field like phone number, email id and reduce lots of java code. ADF framework provides some predefined expression, but you can write any custom expression according your need. In this post I will add validation rule on Email attribute of Employees table. Select Email Attribute in Employees ... Read More »

Validation Using Built-in groovy expression

ADF Groovy provides built-in expression, like adf.currentDate returns current date. In this blog I will explain how to use above built-in groovy expression to validate Hire Date attribute of Employees table. Validation: Hire Date must be less than or equal to current Date. Select HireDate Attribute in Employees entity and go to validation tab. Then click on “Green Plus” icon ... Read More »

ADF: Validate attribute value based on other entity’s attribute (Using Accessor).

Sometimes we need to validate attribute based on other entity’s attribute. In this post I’m using HR schema, there are master detail relationship between Jobs and Employees table. So when you will create Entity objects using these tables, association will create automatically using foreign key relationship or you can create it yourself. As you can see in following image relationship ... Read More »

Validation in ADF Application (Using Groovy Expression)

ADF support Groovy scripting language, allowing groovy expression to be used in attribute validation. So in this tutorial I will add same validation previously (Validation in ADF Application (Using EntityImpl’s Method)) using java Method but this time Groovy Script. Select Salary Attribute in Employees entity and go to validation tab. Then click on “Green Plus” icon to add new validation ... Read More »

Validation in ADF Application (Using EntityImpl’s Method)

Today I’m going to start new series “Validation in ADF Application”. I’m using Jdeveloper 12c (12.2.1.3.0) for that. ADF offers validation in three different layers. • ADF View • Model • ADF Business Component First I’ll cover validation on business service layer. ADF offers many ways to enable validation in attribute level. For e.g. you can use groovy expression, java ... Read More »

ADF: How to upload file in FTP server using apache common net API?

This post is about How to upload file in FTP Server using apache common net API(Download here). ADF faces inputFile component allows user to upload file from browser. So we only need to connect to FTP server and upload file. Following are steps- Add inputFile component from component palette to page. Make sure usesUpload property of form is true. On ... Read More »

Creating new row on pressing “TAB” key in the last cell of Table.

Someone asked in oracle community forum, How to create new row on pressing tab key in table’s last cell? So here is complete example with sample code (jdev 11.1.1.9.0). I’m using HR Schema for sample application. There are three main steps First add clientListener and serverListener to last column of ADF table. Following java script method is called when user ... Read More »