[
https://issues.apache.org/jira/browse/WICKET-487?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Johan Compagner closed WICKET-487.
----------------------------------
Resolution: Fixed
Fix Version/s: 1.3.0-beta5
I applied your else if
> Buggy behaviour in PageMap.access(IPageMapEntry,int). Wicket1.2.4
> -----------------------------------------------------------------
>
> Key: WICKET-487
> URL: https://issues.apache.org/jira/browse/WICKET-487
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.2.4, 1.2.5
> Reporter: Kadir Sener GUMUS
> Assignee: Johan Compagner
> Fix For: 1.2.7, 1.3.0-beta5
>
>
> On 4/19/07, Kadir Sener GUMUS <[EMAIL PROTECTED]> wrote:
> Hi all,
> in our application, we were experiencing PageExpired pages. When i digged in
> wicket sources i found something causes my problem and now it is ok after
> change the behaviour. I dont know if it was fixed in later releases, i wanted
> to share that you all.
>
> Plz enlighten me if i am wrong or that is an expected behaviour. Let me
> explain the case:
> Assume that we have a pageMap contains 3 page entry inside as ordered as
> "pageA.version0, pageB.version0, pageB.version1" and we pressed the back
> button from pageB.v1 to pageB.v0! Before calling this
> "access(IPageMapEntry,int)" method in "get(int,int)" of PageMap,
> "page.getVersion(versionNumber)" method is called. In that method, if the
> page goes back to initial version(0), versionManager is removed! Therefore, "
> topPage.getVersions()" returns 1 as default. Consequently, "else" block was
> running and removing whole page (pageB), and......Bomb!! "PageExpired" :)
>
> Here it is the changed code:
>
> ....(PageMap.class)
> private
> final void access( final IPageMapEntry entry, final int version){
> .....
> if (top instanceof Page)
> {
> // If there's more than one version
> Page topPage = (Page)top;
> if (topPage.getVersions() > 1)
> {
> // Remove version the top access version (-1)
> topPage.getVersion(topAccess.getVersion()-1);
> }
> //--- PLZ look at here!! (K.GUMUS)
> //else
> else if (topPage.getNumericId() != access.id &&
> topPage.getCurrentVersionNumber() != access. version)
> {
> // Remove whole page
> remove(topPage);
> }
> }
> ....
> regards,
> Kadir Sener GUMUS
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.