I think it looks fine.. However I'd delegate the creation of the model to session...
page setDefaultModel(getSession().getUserModel()) session: function DetachableUserModel getUserModel() { return new DetachableUserModel(getSession().getUser(),userDao); } 2009/2/20 Tauren Mills <tau...@groovee.com> > Nino and Martijn, > > Thanks for the help. Last night I was looking through the elephas > code and found a solution that I think will work for me. It doesn't > store an LDM in the session, but stores an identifier and a > *transient* instance of User. This seems like an effective solution > to me. I tried it out and haven't had problems yet. Here's the > elephas session so you can see for yourself: > > http://code.google.com/p/elephas/source/browse/trunk/src/main/java/org/elephas/webapp/application/ElephasSession.java?r=87 > > Then on my page, I just do something like this: > setDefaultModel(new DetachableUserModel(getSession().getUser(),userDao)); > > Please let me know your thoughts on this. > > Thanks, > Tauren > > > On Fri, Feb 20, 2009 at 2:05 AM, nino martinez wael > <nino.martinez.w...@gmail.com> wrote: > > Hi Tauren > > > > I've done something similar.. Have no trouble with.. > > > > Disclaimer, below code are really ugly and I need to clean it up... > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >