Great thanks! However you also need to remove the call to removeNewerThan(Page) from HttpRequestCycle. Because this will expire any popup if the main page is refreshed. See the "popups and page expired" mail from Eelco on 19-01-05 15:20.
Maurice -----Oorspronkelijk bericht----- Van: Jonathan Locke [mailto:[EMAIL PROTECTED] Verzonden: donderdag 20 januari 2005 19:15 Aan: [email protected] Onderwerp: Re: [Wicket-develop] popups and expired pages i added remove(Page) to session and renamed expireNewerThan(Page) to removeNewerThan(Page) because expire is confusing here given the stale boolean and all... remove is what these methods do. anyway, this should solve your problem. just call Session.remove(Page) on your popup when it closes. Eelco Hillenius wrote: > I agree that users should have the possibility to discard pages from > the session that are not important for further application flow. > ExpireNewerThan would not work here, as it will also expire the popups > that were opened later than the one the current popup. > > The other way around would be to have pages that will allways sit in > the session (e.g. kind of static pages), but I see much more problems > with this than providing users a means to expire one specific page in > the session. > > So, I'm +1 for adding an expirePage method in session. > > Eelco > > Maurice Marrink wrote: > >> Hi, >> >> I have the following situation: >> >> 1 "Main" Page which can spawn multiple popup's. >> >> Each popup is a new Page in a new browser window. >> >> Each popup ultimately goes to a new Page which renders html that will >> close the popup (call it the ClosePopupPage). >> >> Upon closing the popup the main page is refreshed through javascript. >> >> All works fine until I reach the session limit of 10 Pages. >> >> With 1 Main Page this means I can open and close 4 popup's without >> problems. I can even open the 5^th , but when I close the 5^th popup >> the main Page is kicked from the session to make room for another >> ClosePopupPage. >> >> When that page is loaded by the browser it attempts to refresh the >> main page, but since it no longer is in the session, I get a page >> expired message. >> >> Now I could change my code to reuse Pages and or use less Pages or >> increase the Page cache size but this will only postpone the inevitable. >> >> A method in Session allowing me to "expire" a Page would IMO be the >> correct solution. >> >> That way I could remove all Pages related to a popup when I close the >> popup, this way the cache never gets full. >> >> Maurice >> > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting > Tool for open source databases. Create drag-&-drop reports. Save time > by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. > Download a FREE copy at http://www.intelliview.com/go/osdn_nl > _______________________________________________ > Wicket-develop mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/wicket-develop > ------------------------------------------------------- This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl _______________________________________________ Wicket-develop mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/wicket-develop ------------------------------------------------------- This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl _______________________________________________ Wicket-develop mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/wicket-develop
