Tuesday, September 15, 2015

ADF BC Inline View Criteria for Hierarchical Search

ADF BC View Criteria allows to implement Inline View Criteria to execute hierarchal search. This is especially useful, when you have Master-Detail relationship and want to filter Master records, based on attribute value from Detail. Keep in mind, Inline View Criteria for hierarchical search would not work, if VO is based on custom SQL query. It works only with declarative VO's.

This is how View Criteria with detail search option looks like. If there is View Link available, you can select depend VO from the list of attributes. JDeveloper automatically sets Inline View Criteria option and you can select any attribute from detail VO. All criteria attributes will be rendered in the single search block on UI:


Inline View Criteria is created based on View Link:


Make sure not to use custom SQL based VO, Inline View Criteria would work only with declarative or not custom SQL based VO:


Search filters Master results (departments), based on Detail filtering (employees). I'm searching for employees with salary greater or equal to 12000. This query returns only those departments, where employees with such salary are available:


If I search with lower salary, more departments are present in the result:


Download sample application - TreeSearchApp.zip.

3 comments:

Kim said...

Uitstekende blog met een hoop zinvolle informatie! Bedankt voor het delen.

Andrej Baranovskij said...

Danke :)

Habib said...

Hi,
very interesting

Regards,
Habib