0

I have a search page with multiple search options(input text boxes) Based on the search criteria entered , I need to create a dynamic search query. (I need search results based on the fields for which user inputs some value)

vipulg
  • 1
  • 1

3 Answers3

1

or you can use <af:quickQuery> for a simple search. Here's the sample code taken from Oracle demo.

<af:quickQuery label="Search" id="search" searchDesc="search" binding="#{editor.component}" value="#{demoQuickQuery.queryDescriptor}" queryListener="#{demoQuickQuery.processQuery}">

</af:quickQuery>
RHT
  • 4,974
  • 3
  • 26
  • 32
0

If you are using ADF/BC, this is built-in. Just use the <af:query/> component.

Billy Bob Bain
  • 2,894
  • 18
  • 13
0

af:query is the more robust of the two query components, but does require you create a viewcriteria object in the VO that will be the basis for the query. However it is very powerful: dynamically add new attributes to the query at runtime, change query rules (starts with, contains, etc)

af:quickquery allows you to choose one and only one attribute to query on at a time.

Please note: these components (and the executewithparms) are the only supported query methods in ADF Faces 11g

Joe
  • 3,337
  • 1
  • 14
  • 11