Re: [Wicket-user] Page cache / page pool
Hi, Johan Compagner wrote: So if you show A the second time then yes B is dropped. But if you then do setResponsePage(B) B is again pushed to the stack and should be able to render fine. I found out why this questions sounded so stupid to you: I used ajax to show the cached page in a certain frame and that was recognized to look like a back-button request. I managed to change this and use setResponsePage now. Thanks for help! Chris -- View this message in context: http://www.nabble.com/Page-cache---page-pool-tf3213152.html#a8964047 Sent from the Wicket - User mailing list archive at Nabble.com. - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] Page cache / page pool
Hi, for our navigation bar, I want to use a page cache to resume editing the latest page version. Wicket's page map acts like a stack, so opening PageA, PageB, PageA, leads to the expiration of the PageB instance. However I want to reuse the cached/saved page instance of PageB (could be a list, where the user has marked several items). So unlike saving the last 5 accessed pages in the pagemap-STACK, I want to save the (maybe) 10 last accessed pages in a MAP, that doesn't expire pages when displaying a cached page. Taking a look at the wicket source code, I found that PageMap.access() cleans up all previous pages if I return back to the instance of PageA. Unfortunately all involved methods are private or final, such that I can't change this behavior by subclassing to provide my own expiration strategy. Does anybody has ideas or any experience with caching page instances? Thanks for your replies. Chris -- View this message in context: http://www.nabble.com/Page-cache---page-pool-tf3213152.html#a8922873 Sent from the Wicket - User mailing list archive at Nabble.com. - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier. Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Page cache / page pool
if you keep on to PageB in PageA and when you want to go back to PageB then you can set that page as a response page. That should work fine So just keep a reference in a map to the pages you want. We do clear them from the pagemap when we encounter a backbutton but if you keep a refence to those pages and resuse them that is not a problem On 2/12/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi, for our navigation bar, I want to use a page cache to resume editing the latest page version. Wicket's page map acts like a stack, so opening PageA, PageB, PageA, leads to the expiration of the PageB instance. However I want to reuse the cached/saved page instance of PageB (could be a list, where the user has marked several items). So unlike saving the last 5 accessed pages in the pagemap-STACK, I want to save the (maybe) 10 last accessed pages in a MAP, that doesn't expire pages when displaying a cached page. Taking a look at the wicket source code, I found that PageMap.access() cleans up all previous pages if I return back to the instance of PageA. Unfortunately all involved methods are private or final, such that I can't change this behavior by subclassing to provide my own expiration strategy. Does anybody has ideas or any experience with caching page instances? Thanks for your replies. Chris -- View this message in context: http://www.nabble.com/Page-cache---page-pool-tf3213152.html#a8922873 Sent from the Wicket - User mailing list archive at Nabble.com. - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier. Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier. Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Page cache / page pool
Hi, Johan Compagner wrote: if you keep on to PageB in PageA and when you want to go back to PageB then you can set that page as a response page. That should work fine So just keep a reference in a map to the pages you want. We do clear them from the pagemap when we encounter a backbutton but if you keep a refence to those pages and resuse them that is not a problem I have a common WebPage class that invokes something like PageCache.get().cache(this); The PageCache class does cachedPageMap.put(page.getPageClass(), page); The menu bar checks PageCache.get().pageFor(PageA.class), which checks the cachedPageMap for a page instance. If the result is not null, the page is displayed, otherwise a new page is created. However if pageA, pageB, pageA, pageB is opened then I see a page expired error page instead of the last pageB, because the second opening of pageA (which uses the same instance as first time) looks like a back-button for wicket and pageB drops out of the stack (and thus gets expired). That happens in PageMap.access(), the comment there says: Pop entries to reveal that version at top of stack because the user used the back button (Page has still the same version and id...) Is there a way to tell wicket, that the back-button hasn't been used? Btw, I'm using wicket 1.2.4. Chris -- View this message in context: http://www.nabble.com/Page-cache---page-pool-tf3213152.html#a8923908 Sent from the Wicket - User mailing list archive at Nabble.com. - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier. Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Page cache / page pool
However if pageA, pageB, pageA, pageB is opened then I see a page expired error page instead of the last pageB, because the second opening of pageA (which uses the same instance as first time) looks like a back-button for wicket and pageB drops out of the stack (and thus gets expired). So if you show A the second time then yes B is dropped. But if you then do setResponsePage(B) B is again pushed to the stack and should be able to render fine. johan - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier. Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user