BC4J 9034: Paging after passivation of ExpertMode, readonly VO*s with applied ViewCriterias
Yesterday evening, while (still) debugging into the JDK1.4 issue, one of the guys here - came up with an interesting issue - and i just want to share the outcome of our findings here ..
Imagine having a VO that is expertMode, and NOT EO-based, which will per default not passivated.
So after turning this one, bear in mind, that when you apply ViewCriteria*s to it (VO.applyViewCriteria ..) - these settings will be passivated (and activated) too..
So after paging through the pages of my VO (and not passivating after each JSP) - everything worked cool,
until the first time, where i started passivation in between the paging process, because of showing up a popUp (with details of a row) - and forced our bc4j framework to release my DB-Connection before doing so.
When switching back to the jsp - that included my paging, suddenly my VO seemed to be empty (VO.getRowCount == 0, while VO.getEstimatedRowCount still returned the correct number of filtered rows).
So after thinking little on it, i personally got the idea that when reactivating from the snapshot (as we just save the delta to the snap) - we should re-execute our query (just in the action, after paging to the next page) - by using VO.executeQuery(); -> and voila it worked :) - as we create a new SessionCookie for our user, after getting back from a detail, i consider this as default behaviour - as we get to a new, 'clean', enviroment ..
hint: to check if you have ViewCriteria*s applied just use VO.getViewCriteriaClause().
If i have some spare-time (probably when flying back home :) today), i will try to build a little testcase for that, to ensure that we're on the best way here ..
Having questions? Feedback me on this entry Clemens Utschig
0 Comments:
Post a Comment
<< Home