This discussion is archived
3 Replies Latest reply: Feb 7, 2013 11:26 PM by Frank Nimphius RSS

table filter: search for string containing 'and'

989823 Newbie
Currently Being Moderated
JDev 11.1.1.3.0

Table filter: If I try to search for a string containing ' and ', ADF seems to break down the string to look for.
eg. a search for the string 'abc and def' in a column 'col' would create a where clause: where col LIKE 'abc%' AND col LIKE 'def%' and I get no results. Is there a way to disable this 'feature' of table filters?

filterFeatures attribute of af:column seems to support only "caseSensitive" and "caseInsensitive". A query listener in a backing bean doesn't seem to help much as the actual break down of the string happens somewhere in the viewobject. May be there is some method that I can overwrite somewhere?
  • 1. Re: table filter: search for string containing 'and'
    Timo Hahn Oracle ACE
    Currently Being Moderated
    There is no option to turn off this behavior. The QBE (Query by example) stuff treads 'and' and 'or' and '>' and '<' as operators. So the only solution would be to deep dive into the implementation in the VO.

    Timo
  • 2. Re: table filter: search for string containing 'and'
    989823 Newbie
    Currently Being Moderated
    don't seem to have much luck looking into the implementation.
    http://docs.oracle.com/cd/E12839_01/apirefs.1111/e10653/oracle/jbo/server/ViewObjectImpl.html
    buildViewCriteriaClauses(ViewCriteria vc) of ViewObjectImpl is the closest I have gotten to (i think). Not sure of other unintended consequences even if I were able to modify the whereclause this method is returning.

    started looking into another option using the queryListener in the backing bean: basically using wildcards with the operators in the filter criteria map.
    eg. replacing occurrences of ' AND ' with '_AND_' . and of course, reverting it after invoking the query.
  • 3. Re: table filter: search for string containing 'and'
    Frank Nimphius Employee ACE
    Currently Being Moderated
    Hi,

    have a look here

    http://www.oracle.com/technetwork/developer-tools/adf/learnmore/59-table-filter-by-data-range-176653.pdf

    its for date ranges but should be easily modified to meet your requirement

    Frank

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points