Tuesday, December 27, 2011

Query Binding Property: InitialQueryOverridden

I was working on a requirement, wherein, we had to launch a search page by applying a view criteria, which is different from the one in the search panel. While debugging, it was observed that, when the view criteria was applied, VO has been populated with the rows. But the UI is not displaying the records of the pre-executed query.

By default, Query binding will follow 'AutoQuery-or-ClearRowSet' behavior (which is based on the view criteria attribute). Thus, even though we have executed the query well before the page is launched, query Binding is executing the Clear Rowset (in my case it is Clear Rowset). To override the default 'AutoQuery-or-ClearRowSet' behavior , one can use the query binding's property InitialQueryOverridden.

When this property is set to true, i was able to see the results of the pre-executed query.

4 comments:

sapna said...
This comment has been removed by the author.
Tarun said...
This comment has been removed by the author.
Tarun said...

Hi Raghu,

In this case does the search region attribute values defaulted with values passed to view criteria?(assuming we are using same viewcriteria to execute VO before page execution)

Thanks, Tarun

Unknown said...

Hi Raghu,
i applied viewCriteria programmaticaly,in the Def.xml. i overridden this method InitialQueryOverridden and set as false, eventhough it working ..

Thanks in advance..
Ram