I have tried the suggestion, and am still having trouble. In my base page component, I have the following code at the end of the constructor:
setVersioned(false); In addition, I have the following code in my extension of WebApplication.init: getSessionSettings().setMaxPageMaps(1); getPageSettings().setMaxPageVersions(1); getPageSettings().setVersionPagesByDefault(false); Despite all of this, if I navigate to the URL for one of these pages, then navigate to that URL again with different parameters, I see two pages in my session. In fact, I always see between 1 and 5 pages in session. It seems to max out at 5: p:null:7 = [Page class = com.<removed>.wicket.page.search.SearchResultsPage, id = 7] p:null:8 = [Page class = com.<removed>.wicket.page.search.SearchResultsPage, id = 8] p:null:5 = [Page class = com.<removed>.wicket.page.search.SearchResultsPage, id = 5] p:null:9 = [Page class = com.<removed>.wicket.page.search.SearchResultsPage, id = 9] p:null:6 = [Page class = com.<removed>.wicket.page.search.SearchResultsPage, id = 6] I'm thinking that the original suggestion may not have been correct for the problem I'm trying to solve. How can I ensure that when they navigate to the same URL with new parameters, Wicket creates a new page and abandons the previous instance of that page? I'm guessing I would need to override whatever factory method creates pages so that it can check the page map and remove any previous instances of the page before creating and returning a new one. -Jason dukejansen wrote: > > Did not know about that functionality. Sounds perfect. Then for pages > which must always have bookmarkable URL, we can always extend a base class > that sets itself to unversioned, and for other non-bookmarkable pages we > can still rely on the standard behavior with back button support. > > Thanks! > > -Jason > > > Johan Compagner wrote: >> >> Ahh so you are using pages with state. (you use ajax) >> You just don't want to version them? Because for navigation you only use >> bookmarkable pages >> >> Just have one base page that does serVersioned(false) >> then all your pages are unversioned. >> >> johan >> >> >> On 1/24/07, dukejansen <[EMAIL PROTECTED]> wrote: >>> >>> >>> Sorry, guess I misunderstood. Still trying to wrap my head around these >>> concepts. >>> >>> We have an app that is all bookmarkable pages so far, but we may >>> encounter >>> cases without them further down the road. >>> >>> But even for our bookmarkable pages, they may have lots of activity on >>> them >>> which is ajax actions which update the model behind the scenes. The way >>> wicket wires components to their models is still very beneficial, as is >>> the >>> markup inheritance and java-centric development model, etc. >>> >>> As an example, we currently have a search results page which must always >>> include all search criteria in the URL. So right now we have multiple >>> panels >>> with various search criteria. When the user updates the form elements >>> and >>> clicks "search", we let wicket update all the backing models for us, >>> then >>> we >>> assemble a new URL based on the updated models, and redirect to the new >>> URL. >>> >>> This is instead of what might be a more familiar web model where the >>> form >>> data is simply submitted TO the new URL -- instead, we are submitting to >>> wicket, letting wicket do all the updates to our backing state, and then >>> we >>> just construct a new URL to represent the new criteria and redirect to >>> it. >>> >>> I won't deny that this is a bit wacky, but it was the only way I could >>> find >>> to ensure that my search criteria are included in the URL, but we still >>> get >>> wicket's free behavior of updating all model data. The trick is that we >>> are >>> abandoning the updated model data and redirecting to a new page... >>> >>> Not sure how well I've explained this. If there was a way to get wicket >>> to >>> simply use bookmarkable URLs when it does the form submission, I'd be >>> happy >>> to fall back on wicket. >>> >>> Also, FYI, we are using a lot of the Wicket ajax behavior for updating >>> state >>> which does NOT need to be in the URL. >>> >>> -Jason >>> >>> >>> Johan Compagner wrote: >>> > >>> > But i was talking about the settings maxpageversions. >>> > thats not the same thing as how many there can be in the pagemap >>> > That depends on the page map that is used (in 1.3 or 2.0) >>> > AccessStackPageMap uses by default 5 because that is EvictionStrategy: >>> > >>> > private IPageMapEvictionStrategy pageMapEvictionStrategy = new >>> > LeastRecentlyAccessedEvictionStrategy(5); >>> > >>> > The PageMap of the secondlevelcache only has one active in the >>> session. >>> > >>> > But you are making an app where all the urls are again bookmarkable >>> and >>> > you >>> > don't use forms anywhere? >>> > or if you use for (with wicket 1.2) you handle the post in the >>> constructor >>> > of the page itself? >>> > Thats not really where wicket is made for, your throw away pretty much >>> 90% >>> > of what makes wicket. >>> > >>> > johan >>> > >>> > >>> > >>> > On 1/24/07, dukejansen <[EMAIL PROTECTED]> wrote: >>> >> >>> >> >>> >> I think the current method name makes sense, but what is unclear is >>> >> whether >>> >> the CURRENT page is taking up one of the positions. I would think >>> setting >>> >> the max to 1 would ensure that the pagemap contains the current page >>> and >>> >> no >>> >> others. If in fact the current page doesn't need room in the page >>> map, >>> >> then >>> >> I guess 0 would make more sense. I think adding detail to the javadoc >>> >> should >>> >> be sufficient to clear up this ambiguity. >>> >> >>> >> >>> >> Johan Compagner wrote: >>> >> > >>> >> > set the max to 0 then the change list of the version manager will >>> >> really >>> >> > not >>> >> > ntain anything >>> >> > >>> >> > this is the test: (after the new one is added to the list) >>> >> > >>> >> > // If stack is overfull, remove oldest entry >>> >> > if (getVersions() > maxVersions) >>> >> > { >>> >> > expireOldestVersion(); >>> >> > } >>> >> > >>> >> > What is logical? max versions is that also counting the current >>> one? >>> >> > What is the best English for this?? >>> >> > should we better express it like: setMaxPageUndoBuffer() ?? >>> >> > >>> >> > johan >>> >> > >>> >> > >>> >> > On 1/24/07, dukejansen <[EMAIL PROTECTED]> wrote: >>> >> >> >>> >> >> >>> >> >> >>> >> >> Eelco Hillenius wrote: >>> >> >> > >>> >> >> > Well, every user (session) will use memory, correct. But only to >>> a >>> >> >> > certain limit. Wicket 1.2 holds a couple of page/ versions in a >>> >> >> > session, and Wicket 2.0 by default only holds the current one. >>> So >>> >> the >>> >> >> > creation of a fresh instance (e.g. a bookmarkable page) will >>> replace >>> >> >> > another one. Hence, how much memory you'll need is a simple >>> function >>> >> >> > of the number of concurrent sessions times the size of your >>> session >>> >> >> > and page(s) in it. >>> >> >> > >>> >> >> >>> >> >> How can I instruct Wicket not to maintain the multiple versions of >>> a >>> >> >> given >>> >> >> page within the session? I've tried the following but when I dump >>> the >>> >> >> session contents I still see multiple page versions: >>> >> >> >>> >> >> getSessionSettings().setMaxPageMaps(1); >>> >> >> getPageSettings().setMaxPageVersions(1); >>> >> >> >>> >> >> Am I missing the boat on this entirely? >>> >> >> >>> >> >> -Jason >>> >> >> -- >>> >> >> View this message in context: >>> >> >> >>> >> >>> http://www.nabble.com/Strategy-to-avoid-new-instances-of-pages-and-panels-tf2566413.html#a8553452 >>> >> >> 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.php&p=sourceforge&CID=DEVDEV >>> >> >> _______________________________________________ >>> >> >> Wicket-user mailing list >>> >> >> Wicket-user@lists.sourceforge.net >>> >> >> https://lists.sourceforge.net/lists/listinfo/wicket-user >>> >> >> >>> >> > >>> >> > >>> >> >>> ------------------------------------------------------------------------- >>> >> > 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.php&p=sourceforge&CID=DEVDEV >>> >> > _______________________________________________ >>> >> > Wicket-user mailing list >>> >> > Wicket-user@lists.sourceforge.net >>> >> > https://lists.sourceforge.net/lists/listinfo/wicket-user >>> >> > >>> >> > >>> >> >>> >> -- >>> >> View this message in context: >>> >> >>> http://www.nabble.com/Strategy-to-avoid-new-instances-of-pages-and-panels-tf2566413.html#a8570594 >>> >> 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.php&p=sourceforge&CID=DEVDEV >>> >> _______________________________________________ >>> >> Wicket-user mailing list >>> >> Wicket-user@lists.sourceforge.net >>> >> https://lists.sourceforge.net/lists/listinfo/wicket-user >>> >> >>> > >>> > >>> ------------------------------------------------------------------------- >>> > 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.php&p=sourceforge&CID=DEVDEV >>> > _______________________________________________ >>> > Wicket-user mailing list >>> > Wicket-user@lists.sourceforge.net >>> > https://lists.sourceforge.net/lists/listinfo/wicket-user >>> > >>> > >>> >>> -- >>> View this message in context: >>> http://www.nabble.com/Strategy-to-avoid-new-instances-of-pages-and-panels-tf2566413.html#a8572544 >>> 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.php&p=sourceforge&CID=DEVDEV >>> _______________________________________________ >>> Wicket-user mailing list >>> Wicket-user@lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/wicket-user >>> >> >> ------------------------------------------------------------------------- >> 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.php&p=sourceforge&CID=DEVDEV >> _______________________________________________ >> Wicket-user mailing list >> Wicket-user@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/wicket-user >> >> > > -- View this message in context: http://www.nabble.com/Strategy-to-avoid-new-instances-of-pages-and-panels-tf2566413.html#a8717299 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.php&p=sourceforge&CID=DEVDEV _______________________________________________ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user