This discussion is archived
4 Replies Latest reply: Jul 13, 2013 12:31 AM by Swati RSS

Search Region Execution Problem

ac4991 Newbie
Currently Being Moderated

Hi Experts,

 

I've a problem related to my advanced search region. Its a long story although lemme just explain what i need and then step by step explain what i did so far.

 

Design:      Advanced search region with 4 VARCHAR2 dataType fields and 1 DATE dataType field. (All mapped to advancedTable view attribute     

               columns/formValues ). Works fine when going with standard framework behaviour.                                        

 

Requirement: After user hits 'Go' button or after the VO query executes, i need to generate the XML of the VO data for integrating it with XMLP.

 

Steps Done:

1. I added a table submitButton 'Print' and handled the form submission from this button in the Page controller. Here i'm generating the

     XML data from the VO. But this approach failed with a weird scenario. The xml data was actually of the whole VO Query output and not

     the one filtered by Criteria defined. For E.g. My initial VO query output has 200 records, now suppose we enter a criteria and press

     'Go', it fetches 5 records in the advancedTable. Now when i press 'Print' button, it generates xml data of 200 records. I diagnosed this

     by checking the vo.getQuery() before generating the xml and it showed me the initial vo query defined at design time exclusive of the     

     run-time criterias entered.

 

2. So, i thought that may be framework is not (for some reason) setting the VO where clause. And i captured the QueryBean GoButton in

     the page controller and retrieved the criteria by getCriteria into dictionary and programmatically set the vo where clause. The vo query

     did reflected the where clause i wanted to. So, now after programmatically setting the VO Where clause i was actually able to see the

     query with where clause from vo.getQuery. But then i finally executed the VO Query from the controller with vo.executeQuery and no

     records were fetched in the advancedTable. I couldn't understand this behaviour, why weren't the records fetched? .. When i run the vo

     query (copied from diagnostics) it runs well in toad and fetches 5 records. I can see vo.getRowCount() as 5 but

     vo.getFetchedRowCount() is 0 and also i can't see any records in the advancedTable. I guess the records ain't fetched after

     vo.executeQuery(). THIS IS WEIRD

 

3. Now what to do i'm confused.

Please help me ASAP. I'm stuck and deadlines are close.

 

Regards

Ari

Legend

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