Enter your keyword

post

How to create List Of Values in Oracle ADF

The most common requirement in the project is to create List Of Values. List of Values contains multiple values in a dropdown. In this short article, I’m going to showcase how to create list of values in Oracle Application Development Framework(ADF).

In this project we are going to use HR schema of Oracle Database and Employees and Department table of the same schema.

Some important link might help to you extend your knowledge

ADF BC With No Database Connection

Get Current Logged in User

Below are the steps to create LOV

  • Create a new ADF Fusion Web Application with name as “FirstApp” and provide package prefix as “com.adf.training”. Finish the wizard
  • Right click on the model and select “Create business components from table“. By selecting this we can create Entity Object(EO), View Object(VO) and Application Module(AM) from one wizard. Create “EO”, select the available table and click next. Now to create VO select EO from the list and click Next
  • From the next screen, enter Application Module name as “FirstAppModule” and Finish the Wizard
  • Notice EO, VO and AM has been created
  • Create a query based VO. In order to create a query based VO, right click on the model and select create new view object. Enter the name of the view object and select “Custom SQL query” and click Next
  • Enter the query “select deptno, dname from department” and click next and then finish the wizard
  • Open the “EmployeesView” , go to the Attributes, select Deptno and click on “List of Values” tab
  • Select “DepartmentView1″ from List Data Source dropdown and Deptno from List Attribute
  • Now go to “UI Hints” tab and select Dname
  • Select the “EmployeesView1” from the Data Controls and drop on to the page
  • You will notice the Deptno attribute is of ‘ADF select one Choice’ type. If it is not you can manually select that
  • Run the page and notice the Deptno will be shown as dropdown

Subscribe the YouTube channel to learn more and more everyday.

Leave a Reply

Your email address will not be published.