Saturday, March 19, 2011

View Criteria and CRITERIA_AUTO_EXECUTE Property - ADF 11g PS3

Quick update for previous blog post - View Criteria and CRITERIA_AUTO_EXECUTE Property. Sample application for that post was implemented quite long time ago in 2009. We were checking recently, same functionality on ADF 11g PS3 - to control programmatically View Criteria execution mode. In order to make it work now, code should be changed slightly - add two lines of code:

1. Reset View Criteria, this will clean previously assigned parameter values
2. Save View Criteria state, this will store new value for CRITERIA_AUTO_EXECUTE parameter

Sample code to change CRITERIA_AUTO_EXECUTE parameter and save View Criteria state:


9 comments:

Corneliu said...

Hi,

I make a search and after reseting the ViewCriteria, the iterator on page won't reset to its previous state.

Should the Iterator automaticaly reset also when I reset the ViewCriteria?

Regards Corneliu

Corneliu said...

Hi,

Should the iterator auto reset when I reset a view criteria?
Because on the page the iterator still remains with the values from search.

Regards Corneliu

Andrej Baranovskij said...

Hi,

It will happen, only if Query Auto Execute is set to True.

Andrejus

Corneliu said...

Thanks,

It works

Corneliu

Anonymous said...

Hi Andrejus,
does reset button works in this case?
what I Observed is reset is not working with this approach.
could please download link for this application

Anonymous said...

Hi Andrejus,
We noticed connection are being increased in production due to this change(calling saveState on vc).
we suspect when we are using saveState on View Criteria Item ,bindVariable are storing as snapshot and resulting in passivation(writing these bind params state) to PS_TXN table
is there any alternate way to achive this requirment.
is it safe to call saveState on VC .does it cause the increase of connections

Thanks
Karnakar

Andrej Baranovskij said...

I doubt it, you should check the log - if it really does passivation on VC saveState.

Andrejus

Jagadeesh Badri said...

Looks YES,
saveState – It saves the snapshot of all literal values and variable values.
i.As per the state management - if the jbo.server.internal_connection is not set explicitly then the state management facility creates the temporary tables using the credentials of the current application database connection.
To keep the temporary information separate, the state management facility uses a different connection instance from the database connection pool, but the database credentials are the same as the current user.

Andrej Baranovskij said...

I understand this, but you should check in runtime log - if it really writes state to DB.

Even if it does, i dont see it as performance issue. This is not a passivation/activation event.

Andrejus