Ok, my bad... Cutting out the details, the page that included a ref to the modal window had a piece of javascript, which generated an <IMG> tag with a src attribute starting with a '#' (this is some code ported from a JSF version of the application). The browser was then trying to fetch the page again looking for the (inexistent) bookmark, hence the double hit to the page. Now, I'm wondering if it is normal that the framework evicts the page when removing one of the 2 versions of that page from the access stack since the other version is still there and may be referenced again. But I don't know wicket enough to make a valid statement on this. Many thanks for the helps here and there though. Laurent.
_____ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Laurent Brucher Sent: vendredi 13 juillet 2007 22:42 To: wicket-user@lists.sourceforge.net Subject: [Wicket-user] Modal Window and "Page Expired". 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? 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: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user