322 total views, 1 views today
ADF View Criteria
View Object in ADF is representing a table database object supports Select query against the table. View Criteria is adding ‘Where clause’ to the View Objects but Unlike SQL query View Object support multiple View Criteria. The purpose of allowing multiple ADF view criteria is you can choose the ADF View Criteria you want on your pages.
For example, I have an employee table has a column ‘type; with value ‘manager’ and ‘director’. I want to display the list of managers in one page and list of directors on another page. For this, I simply create two View Criteria, One for employee and another for director and use employee VC for employee page and manager VC for manager page.
In this section, we go through about create a two View Criteria for Employee table, one where salary greater than 10000 and other less than 10000 and test it using App Module.
HR Schema (Comes with Oracle database, the account is locked by default)
View Object from Employee Table (Click here for instruction to create a View Object from a table)
Create a View Criteria
Double Click on the Employee View Object >> Click on the View Criteria >> Click +
icon to add a VC >> Click button Add Criteria >> put rule Salary < 10000 >> Click Ok
The VC will get added into your View Object. The same way, create another View Criteria where Salary > 10000.
Test the View Criteria
JDeveloper provides a tool to test the AppModel before you place the object in your UI pages.
Right Click on the AppModule >> Click Run
The AppModule wizard opens on the screen. Double Click on the Employee View Object and click on binocular icon to select the View Criteria
Move the View Criteria you want to test to the Right and click the button Find. (You can choose multiple criteria )
I have selected VC (Salary > 10000) and the data populated with the applied VC. . Move Right and Left and validate the salary value
The views expressed on this blog are my personal views and do not necessarily reflect the views of my employer.
Please feeling free to reach me on any comments and feedbacks you have. Would be more than glad to listen and reply 🙂
Latest posts by Govind
- How to encode and decode base64Binary datatype in Oracle BPEL - December 11, 2017
- How to Read a File using Oracle BPEL File Adapter Example - December 11, 2017
- How to write a File using Oracle BPEL File Adapter Example - December 10, 2017