We dont need to give the object to the method if we would call
ondetach first and then set the boolen/clear the reference.

You can then just call getModelObject to get it. I dont see currently
all the implications if we change this. Can you make a jira issue so
that we can track this?

On 03/05/2009, Mauro Ciancio <maurocian...@gmail.com> wrote:
> Hi everybody,
>
>   The detach() code for LoadableDetachableModel is this:
>
>     public void detach()
>     {
>         if (attached)
>         {
>             attached = false;
>             transientModelObject = null;
>
>             onDetach();
>         }
>     }
>
>   I have to invoke a model's method which releases resources, but it has
> been set to null.
> How could I do this?
>
> I have to keep an extra reference to my object. Is not this better?:
>
>             onDetach(transientModelObject);
>             attached = false;
>             transientModelObject = null;
>
>
> Just a thought.
>
> Thanks!
> Greetings,
> --
> Mauro Ciancio
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to