Hi, Stefan. It might help to understand what you expect of Wicket: When the object in Page 2 is updated and serialized into the page map, you expect Wicket to know that it must also re-serialize Page 1 and Page 0 with the new object state. The way this happens is simple: if the Page 2 object graph contains a direct reference to Page 1, then Page 1 will be serialized into its own page map entry. Likewise for Page 1 to Page 0. So the issue may boil down to whether object references exist from Page 2 to Page 1 to Page 0.
Since this all gets rather complicated, the conventional wisdom is to share IModels among pages instead of objects themselves, and have the IModel maintain the object in a data store with more appropriate scope (e.g. HTTP session or database). Hope that helps. Dan On Wed, Dec 14, 2011 at 10:18 AM, Stefan Lindner <[email protected]>wrote: > Yes, Pedro, putting things into Session would would work around this. But > I would need to put everything into Session manually. Isn't there any trick > that prohibits Components from being versioned? We don't need any > backbutton support at all. We jut want to keep the page the same unchanged > object during the page's lifetime. Passing objects from that page over to > another and another and anotehr page an klick and submit and and and... and > the page's model/date stays unchanged until the program code changes them? > > Is there a starting point of documentation what exactly happens there and > why this happens only when a second Modalwindow is opened?+ > > Stefan > > -----Ursprüngliche Nachricht----- > Von: Pedro Santos [mailto:[email protected]] > Gesendet: Mittwoch, 14. Dezember 2011 17:13 > An: [email protected] > Betreff: Re: Suppress page serialization > > Hi Stefan, does it makes sense to move this object to the session? > Make sure you make your page instance manager touching each affected page > after to change the object. e.g. Session.get().touch(affectedPage); > > Pedro Henrique Oliveira dos Santos > > > 2011/12/14 Stefan Lindner <[email protected]> > > > Given is a Page 0 with an object. The object has a given value X; > > > > On the Page 0 resides an AjaxLink that opens a new Page 1 in a Wicket > > ModalWindow. The Content is a Page, not a Panel. > > Page 1 knows the object, the object is a parameter in page constructor. > > > > Modifying object to Y and closing page 1 lets the object's value to be > > Y in Page 0. Fine. > > > > Now I Place an AjaxLink on Page 1 that opens a new Page 2. Page 2 > > knows the object as well. > > Page 0 -> klick -> Page 1 -> klick -> Page 2 -> set object to Z -> > > close Page 2 -> close Page 1 -> back on Page 0 Now the value is still > > X. The object tzat was passed to Page 1 and the to Page 2 an that was > > modified in Page 2 lost ists modification back on Page 0. > > > > All Pages are set to versioned(false). > > > > We use Wicket 1.4.19. > > > > Any idea? > > > > Stefan > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > >
