Five modal windows? At the same time? It might be that you are running out of pagemaps.
This is very weird, hovewer, seems to be reproducable. Can you post a quickstart? Also, could you check if this is working with wicket 1.3? -Matej On 7/18/07, Laurent Brucher <[EMAIL PROTECTED]> wrote: > Cookies have been cleared many times, without any success ;-) > > But I found out what is "causing" (directly or indirectly) the problem: > In the page that includes the ajax button that is used to bring up the modal > window, there is a <wicket:head> section at the top of the page. > If I remove this <wicket:head> section, there is no problem with the modal > window anymore. > > The page globally looks like: > <html> > <head> > ... > </head> > <body> > <wicket:head>...</wicket:head> > <wicket:extend> > .... > </wicket:extend> > </body> > </html> > > Somehow, I've noticed that including the <wicket:head> triggers an > additional HTTP request to the same URL (that is, the URL to display the > above page). > Dunno why this is happening but the end result is that the pagemap then > contains 2 versions for the same page ID. > Then, when I hit the button that brings up the modal window, the framework > is trying to access the above page, version 0. This has the effect of > putting that page's version at the top of the pagemap's access stack > (PageMap.access() method). By doing this, the version 1 of the page is > removed from the access stack, but also the page itself (call to > PageMap.remove(Page)). > Thus, once the modal window gets closed and the original page needs to be > rendered, we get a page expired since it was removed from the cache. > > That's as far as I can describe what I've seen & understood tracing the > code. > I'm not sure where the problem lies: second request because of the > <wicket:head> or incorrectly evicting the page. > > Maybe there is something funky in my own code but I don't see what. Or maybe > there is an issue here. > Any input would be helpful at this point. > > Thanks! > Laurent. > > > > _____ > > From: Igor Vaynberg [mailto:[EMAIL PROTECTED] > Sent: mercredi 18 juillet 2007 8:50 > To: [EMAIL PROTECTED]; wicket-user@lists.sourceforge.net > Subject: Re: [Wicket-user] Modal Window and "Page Expired". > > > On 7/13/07, Laurent Brucher <[EMAIL PROTECTED]> wrote: > > Hi all, > > There was a post last December about the same problem that I'm facing right > now, which is getting a page expired error page after I close a modal > window. > The post was called "Firefox and ModalWindow" and seemed to talk about the > issue for FF only. > I've encountered the problem first with FF (2.0.0.4). After reading the > post, I tried with IE7 and it worked ok (that was this afternoon). > This evening, neither IE7 or FF work anymore. Darn! Clearing cookies and > stuff don't change a thing. > Oh, and of course, the Ajax ModalWindow example works just fine (my code is > heavily inspired from that example)... > I'm using Wicket 1.2.6, Tomcat 5.5.20, Jdk1.6u2. > > Have you guys shed any light on this issue at all? > I've tried to trace the code, but as I'm rather new to Wicket, I couldn't > really figure out what's going on... > > Anything I can do to help address this? > > > i wonder, clear cookies in firefox and try again. i know there was a similar > problem if you didnt set the cookie name in the modal window using > setcookiename(), but looks like you did that. still, try clearing the > cookies. > > -igor > > > > > > Below is the code I use, just in case. > > Reagrds, > Laurent. > > > // Page containing the modal window > public class MainPage extends WebPage { > public MainPage() > { > ... > add( new PreferredStationsDialog("prefStationsDialog") ); > ... > } > } > > // The modal window impl. > public class PreferredStationsDialog extends ModalWindow { > public PreferredStationsDialog(String id) > { > super(id); > > setTitle("xyz"); > setCookieName("prefStationsDialog"); > setPageMapName("prefStationsDialogPageMap"); > setPageCreator( new ModalWindow.PageCreator() { > @Override > public Page createPage() { > return new > PreferredStationsDialogPage(PreferredStationsDialog.this); > } > }); > > setCloseButtonCallback(new ModalWindow.CloseButtonCallback() { > public boolean onCloseButtonClicked(AjaxRequestTarget target) { > return true; > } > }); > } > } > > // The content of the modal window, as a Page > public class PreferredStationsDialogPage extends WebPage > { > public PreferredStationsDialogPage( final PreferredStationsDialog dialog > ) > { > super(); > > add( new AjaxLink("button.save") { > @Override > public void onClick(AjaxRequestTarget target) { > dialog.close(target); > } > }.add( new Label("text", "Save")) ); > > add( new AjaxLink("button.cancel" ) { > @Override > public void onClick(AjaxRequestTarget target) { > dialog.close(target); > } > }.add( new Label("text", "Cancel")) ); > } > } > > > ------------------------------------------------------------------------- > 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 > > > > > ------------------------------------------------------------------------- > 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 > ------------------------------------------------------------------------- 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