Hi Martin,

Thanks for your useful & detailed answer!

That's was actually my understanding, but the reality may be a little bit
different on some use cases leading to the LDM being loaded several times
by request cycles...
As it seems to be an issue (if demonstrated :p) rather than a known
behavior, I will try to make a quickstart and open a new thread to discuss
this...

Thanks again & best regards,
Sebastien


On Thu, Nov 17, 2016 at 12:36 AM, Martin Grigorov <mgrigo...@apache.org>
wrote:

> Hi Sebastien,
>
> What exactly is the problem ?
> LoadableDetachableModel loads its model object at first call to
> #getObject() in the request cycle and null-ifies it at #onDetach(), i.e. at
> the end of the request cycle.
>
> If a LDM is reused by several components then it will be null-ified when
> the first component detaches its model, so it will be detached when the
> other components call their #detachModel() method but this should be fine
> because at that time the model could not be used for anything because the
> rendering has finished.
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>

Reply via email to