Monday 2 December 2019

How to create Query Based ViewObject in oracle ADF?

Query based ViewObject is used only to view data in ADF Application. This cannot be used to make any kind of data updations.

Let us take an example of a Query Based ViewObject to view the data of the Departments table.

Select ViewObect in the Menu. 


Here I have given the name "DepartmentDisplayVO". In the Data Source section select "Customer SQL Query" and click next.


Write the SQL query which will be used to show the records.


Here you can see the columns which were selected in the Query. You can select specific columns also in the query.





The Query-based ViewObject is created.


Now add an instance of ViewOject in Application Module.


Run the Application Module to see the results.


Below is the tester window showing records.


You will notice that the attributes of the data are grayed out, that means they cannot be modified. If you need to modify the column values then you need to create Entity based View Object.

No comments:

Post a Comment