Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to manipulate af:query through custom QueryListner.

Sunanda DasSep 17 2014 — edited Sep 18 2014

Hi,

I have an unique requirement. I have a page which fetches data from departments table, through af:query search. In the search part I have four columns DepartmentID, DeptName, ManagerID and LocationID. In results table I need to display as per the Search criteria filled in the Search fields.

My requirement is, I have to search a result set with a range of Manager Id's, say in between 100 to 400. Through AF:Query, we can create a view criteria and using bind variable we can accomplish the above said task. However, there is a twist in my requirement. I cant take input in two fields for the range of Manager Id's. Instead, I have to take input in one input field in the form of 100..400, where 100 should be my starting range and 400 should be my end range. On clicking search, the result of Manager ID's between 100 and 400 should get displayed.

If I reset the fields, and again search for 200..500, then a fresh set of record should be retrieved, with the result of Manager ID's between 200 and 500 getting displayed.

But all the time, I should input in single Input field of a In between condition.

Is there any ways which we can think off, to solve it? I have followed a few links, but I am stuck now.

Links referred:

  1. http://www.awasthiashish.com/2013/12/overriding-default-query-listener-field.html

  2. http://andrejusb.blogspot.in/2008/11/adf-query-component-and-view-criteria.html

  3. http://www.jobinesh.com/2011/04/programmatically-resetting-and-search.html

  4. https://community.oracle.com/thread/1107328?tstart=0

  5. https://community.oracle.com/message/4145085#4145085

Sample Requirement:

  1. When user enters 100..400, user should get the result of Manager ID's between 100 and 400 . User shouldn't be entering any value in the second search field of DepartmentId.

Search1.png

  1. When user enter 200..500, user should get the result of Manager ID's between 200 and 500. User shouldn't be entering any value in the second search field of DepartmentId.

Search2.png

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 16 2014
Added on Sep 17 2014
11 comments
2,934 views