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 SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user