On 8/12/05, Dan Gould <[EMAIL PROTECTED]> wrote: > I've got an unusual use-case for a page and I'm confused about how to > accomplish this in Wicket. However, it seems to be that it should be > completely doable, even if I need to hack some stuff a bit. > > I have a page, (say, http://www.foo.com/foo). Every time I come back to > that page, it should generate a completely new version. So, even if I use > the back button, it should load a new one (I assume I can set META > HTTP-EQUIV="EXPIRES" CONTENT="0" to force this to happen in most > browsers). > > However, I want a link on the page to "see previous version". This should > let you go back to a small number of previous versions. I'm fine with > only allowing people to go back as far as there's stuff in the Wicket > pagemap. > > Wicket-wizards: Any idea how I can do this?
This is what I am currently trying to do. I do not like that Wicket creates a new instance of component each time when I navigate to it. I started with SignIn example. I store list of "recent" pages in my own map in the Application object. When I am about to show SignIn page I check if instance of this class is already instantiated, and I show this one. This works great. But I got some problems. First, when session expires I get NPE *after* I check instance for null. What is weird is that if I start MSIE after I get the exception if Firefox, MSIE shows exactly same exception. So, it may be session-related but it propagates outside of session. I think it is strange since Application object is nested within Session object. Another thing: I now need a link with initializing parameter, which will tell Page to reset its data. I check this parameter in WebRequestCycle or what it is called (don't have time to look in the source right now). Parameter is checked ok, but then I want to set "mustReset" field in the Page. I added this field to the Page class. So, seems that it does not work, or I update a different instance. This is what I will have to resolve. Basically, I want to get the same result as I have in my Struts Dialogs library: http://struts.sourceforge.net/strutsdialogs/dialogaction-logindialogsample.html See that link contains DIALOG-EVENT-INIT parameter, which allows to reset the component. If you run demo you will see that I have two types of links: to navigate to current component, and to initialize component. In my case I can have only one instance of ActionForm anyway, so separate initializing parameter is actually not needed. But in case of Wicket I need separate parameter to initialize the component. Michael. ------------------------------------------------------- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf _______________________________________________ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user