On Sun, 15 Jul 2007, Erik Dreyer wrote: > Everything is working great except the 'display' component is not reflecting > the saved changes. Before replacing the edit component > with the display component, I'm calling setModel() on the original display > component with the updated data. This has no effect visible effect.
I saw that you already solved this by calling onModelChanged(). I think that if you use setModelObject() it does that call so you don't need to call it explicitly. You could also see if just using the same model instance for both edit and display component would do the trick. The equals() implementation of the model object might also affect the behavior, because as far as I remember the onModelChange-things get triggered only when !newModelObject.equals(oldModelObject). > The 'display' component is itself a tree of components. Is there a > prescribed way to propogate the fact that I updated the model down > to all the affected child components? Is that something I have to handle > myself or does the framework do that? I think that sharing the model is a common trick. Note that you can also nest models, if you e.g. need CompoundPropertyModel handling the same data that is in another kind of IModel elsewhere. - Timo -- Timo Rantalaiho Reaktor Innovations Oy <URL: http://www.ri.fi/ > ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user