Automatic detachment is one of the things we're looking into for 1.5 or 1.6
Martijn On Fri, Jul 10, 2009 at 12:47 PM, James Carman<jcar...@carmanconsulting.com> wrote: > Perhaps there could be some sort of registry for models that need to > be detached. Then, after rendering, they're all detached as part of > the request cycle? > > On Fri, Jul 10, 2009 at 4:00 AM, Martijn > Dashorst<martijn.dasho...@gmail.com> wrote: >> If you share a model between components, then yes–each component will >> call detach on the model. That's encapsulation for you: one component >> doesn't know about another component, so it can't know that its model >> was detached. >> >> Martijn >> >> On Fri, Jul 10, 2009 at 9:41 AM, Ian MacLarty<ian.macla...@gmail.com> wrote: >>> I put a breakpoint on the detach method of my model and had a look at >>> the Components whose detach methods were called higher up in the stack >>> trace. It looks like the detach method on the model is being called >>> for every component on the page. All the components link to the same >>> underlying model via a CompoundPropertyModel, so I guess lots of calls >>> to the detach method of the model should be expected? >>> >>> Ian. >>> >>> On Fri, Jul 10, 2009 at 5:17 PM, Eelco >>> Hillenius<eelco.hillen...@gmail.com> wrote: >>>> It's fine if a model if detached multiple times in a request, but >>>> hundreds for a single model sounds suspicious. Try to trace what >>>> components fire the detach method and see if there's anything weird >>>> with that. >>>> >>>> Eelco >>>> >>>> On Thu, Jul 9, 2009 at 11:21 PM, Ian MacLarty<ian.macla...@gmail.com> >>>> wrote: >>>>> Hi, >>>>> >>>>> I noticed that my IDetachable model is being detached many times >>>>> (hundreds) for each request. Is that something to worry about, or is >>>>> it just because the detach method is called for each component that >>>>> points to this model? >>>>> >>>>> Ian. >>>>> >>>>> --------------------------------------------------------------------- >>>>> 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 >>> >>> >> >> >> >> -- >> Become a Wicket expert, learn from the best: http://wicketinaction.com >> Apache Wicket 1.3.5 is released >> Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3. >> >> --------------------------------------------------------------------- >> 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 > > -- Become a Wicket expert, learn from the best: http://wicketinaction.com Apache Wicket 1.3.5 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org