No, he means *all* models. The idea would be that Wicket would look for fields of type IModel (or its descendants) on components/pages. If it sees one, it would automatically detach it.
On Mon, Jul 13, 2009 at 3:47 AM, Vladimir K<[email protected]> wrote: > > Martijn, > > you probably mean how chained models would be detached. So instead of > propagating detach in IChainedModel they would be detached automatically? > > Is there a vision how it would be accomplished? > > > Martijn Dashorst wrote: >> >> 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<[email protected]> 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<[email protected]> 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<[email protected]> >>>> 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<[email protected]> 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<[email protected]> >>>>>> 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: [email protected] >>>>>>> For additional commands, e-mail: [email protected] >>>>>>> >>>>>>> >>>>>> >>>>>> --------------------------------------------------------------------- >>>>>> To unsubscribe, e-mail: [email protected] >>>>>> For additional commands, e-mail: [email protected] >>>>>> >>>>>> >>>>> >>>>> --------------------------------------------------------------------- >>>>> To unsubscribe, e-mail: [email protected] >>>>> For additional commands, e-mail: [email protected] >>>>> >>>>> >>>> >>>> >>>> >>>> -- >>>> 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: [email protected] >>>> For additional commands, e-mail: [email protected] >>>> >>>> >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: [email protected] >>> For additional commands, e-mail: [email protected] >>> >>> >> >> >> >> -- >> 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: [email protected] >> For additional commands, e-mail: [email protected] >> >> >> > > -- > View this message in context: > http://www.nabble.com/model-detached-many-times-tp24422368p24457432.html > Sent from the Wicket - User mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
