Skip to main content

Changing the default display of af:quickQuery using criteriaItems facet

Is there a way to change the default display of search items used in an af:quickQuery component?

Well answer is Yes. If you want to change the default display of <af:quickQuery> component you can do that by adding your own component set inside criteriaItems facet. Please check out the tag doc for <af:quickQuery> to learn more.

The below shown example may alter the quickQuery component display showing af:outputLabel for the search criteria item instead of the default drop down list. This specific example is useful when you have only one field in the the view object (a rare scenario though). Thanks to Sriram Raghavan(Oracle - ADF team) who shared this tip in an internal discussion forum :)

  <af:quickQuery label="Search" searchDesc="Search" id="qryId1"  
      <f:facet name="end">  
           <af:commandLink text="Advanced" rendered="true" id="cl1"/>  
      <f:facet name="criteriaItems">  

You can see the difference in display in the following picture. The first quickQuery displays search criteria item(s) using a drop down( which is default), whereas the second one displays the search criteria item on a label.


Popular posts from this blog

How to set Bind Variable Values at runtime ?

In this post I'm sharing a couple of approaches for programmatically setting bind variables values at run time. This post is an attempt to explain 'When to use what ?'[ In case if you are familiar with 'Bind Variables' in ADF BC, please refer Section 5.10, Working with Bind Variables in Fusion Developer's Guide ]

1. Set the Bind Variable value using RowSet::setNamedWhereClauseParam(...)

You can use use the setNamedWhereClauseParam(...) method on the ViewObject interface (which extends oracle.jbo.RowSet) to set the value for bind variables. Please note this sets the value on default RowSet. In other words, this doesn't have any effect on the secondary RowSets that you/system generates.
ViewObject vo = am.findViewObject("EmployeesView1"); vo.setNamedWhereClauseParam("bindVarDeptId", new Number(10)); vo.executeQuery();
2. Set the Bind Variable value using ViewObject's VariableValueManager::setVariableValue(...)

VariableValueManager Ma…

Happy New Year 2018 !

We can't go back and change the beginning, but we always can start where we are and change the ending. Believe in yourself and you will be unstoppable!

Wishing you and your family a very happy new year 2018 !!!