In this blog I will show you what you need to do to make this work. You need to know a litte bit about MDS and ADF security, for more info read my previous blog.
The ADF Query panel not only displays the attributes of the viewobject but also the viewobject criteria's. For this I created a new criteria called SalaryCriteria. To do this yourself we have to open the viewobject, go to the query part and there we see the defined criteria's.
In this editor you can create a complex where clause. The bind variables you use in this criteria are displayed as search attributes in the ADF Query Panel.
When you open the viewobject in the datacontrol there is a sub folder called Named Criteria. You can drag one of the criteria's to the page. If you use All Queriable Attributes then you get as default, a query panel with all the queriable attributes of the viewobject. When we use the SalaryCriteria then only the salary bind variable is displayed, off course you can still use the other attributes for a search operation.
When you drag a named criteria on the jsf page you get a chioce to select a particular query panel. I now use the ADF Query Panel with Table. With Table means with a search result table.
Here you see result when we drag the all queriable attributes named criteria from the datacontrol. Now if we want to save the search we have to use the ADF Security wizard and add security to the page definition of this search page. The last step is to configure MDS in this web application. We have to enable MDS on the viewcontroller project and pages and of course. configure adf-config.xml for MDS, you can use the adf-config of my previous blog, you only have to change the folders of the metadata path.
Here you see what is happening when you save a search. ADF creates a persdef folder and in this folder ADF makes a copy of the used viewobject and adds the new search criteria to it. ADF does the same thing as we did manually in the viewobject.