Yeah, but how to I guarantee that it will be detached and reloaded on every request.
Also, the application is already using the session as the factory for this loadable detachable. Just out of curiosity, I cached it rather than always constructing a new one, and I started getting all sorts of errors. So then I started to think that perhaps I could try make sure that a new one is generated per request. I tried using a thread local to hold the LDM on the session but that caused the same errors. D/ On Nov 19, 2009, at 5:32 PM, Igor Vaynberg wrote: > the whole point of "LoadableDetachable" is that you load it once and > reuse it until detached, at least this is how LDM works. > > -igor > > On Thu, Nov 19, 2009 at 2:50 PM, Douglas Ferguson > <doug...@douglasferguson.us> wrote: >> I am maintaining an app that is written in wicket. >> >> When a user logs in the userId is stored on the session. >> There is a method on the session object that returns a >> UserAccountLoadableDetachable. >> This loadable detachable is created every time the method is called. >> >> My thought was that I could share it across the request. >> >> D/ >> >> >> On Nov 19, 2009, at 3:53 PM, Igor Vaynberg wrote: >> >>> whats the usecase for a request-scoped variable? >>> >>> you can have a transient field on the page that you null in ondetach()... >>> >>> otherwise you can access httpservletrequest and use attributes. >>> >>> -igor >>> >>> On Thu, Nov 19, 2009 at 1:51 PM, Douglas Ferguson >>> <doug...@douglasferguson.us> wrote: >>>> is there a best practice for request scoped variables in wicket? >>>> >>>> D/ >>>> >>>> --------------------------------------------------------------------- >>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >>>> For additional commands, e-mail: users-h...@wicket.apache.org >>>> >>>> >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >>> For additional commands, e-mail: users-h...@wicket.apache.org >>> >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >> For additional commands, e-mail: users-h...@wicket.apache.org >> >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org