You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by kumar <ku...@mailinator.com> on 2010/12/11 19:26:53 UTC
Detach() explanation
Hi everyone,
can I get an example how to implement the detach() method ? can someone
please post a detailed example ?
why and in which cases implementing detach() is important ?
thanks.
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Detach-explanation-tp3083568p3083568.html
Sent from the Users forum mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Detach() explanation
Posted by Eelco Hillenius <ee...@gmail.com>.
This also applies to models, which you should use if you can over
doing this directly in components. Also, besides serialization, the
default configuration in Wicket keeps the current page in memory
between requests. If you properly 'detach' (deflate might have been a
good alternative word), you drastically cut down on the memory you use
per session.
Eelco
On Wed, Dec 15, 2010 at 12:33 AM, Martin Grigorov <mg...@apache.org> wrote:
> hi,
>
> each page with all its components is being serialized and stored somewhere
> (session, disk) at the end of a request.
> This is needed to be able to support stateful pages and to be able to return
> to previous page or version of a page with the browser back button.
>
> Each component and model has detach() method in which it can null-ify any
> member variable that is not needed to be stored, i.e. the value of this
> variable is either not important or can be restored by other means.
>
> On Sat, Dec 11, 2010 at 7:26 PM, kumar <ku...@mailinator.com> wrote:
>
>>
>> Hi everyone,
>>
>> can I get an example how to implement the detach() method ? can someone
>> please post a detailed example ?
>> why and in which cases implementing detach() is important ?
>>
>> thanks.
>> --
>> View this message in context:
>> http://apache-wicket.1842946.n4.nabble.com/Detach-explanation-tp3083568p3083568.html
>> Sent from the Users forum mailing list archive at Nabble.com.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Detach() explanation
Posted by Martin Grigorov <mg...@apache.org>.
hi,
each page with all its components is being serialized and stored somewhere
(session, disk) at the end of a request.
This is needed to be able to support stateful pages and to be able to return
to previous page or version of a page with the browser back button.
Each component and model has detach() method in which it can null-ify any
member variable that is not needed to be stored, i.e. the value of this
variable is either not important or can be restored by other means.
On Sat, Dec 11, 2010 at 7:26 PM, kumar <ku...@mailinator.com> wrote:
>
> Hi everyone,
>
> can I get an example how to implement the detach() method ? can someone
> please post a detailed example ?
> why and in which cases implementing detach() is important ?
>
> thanks.
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Detach-explanation-tp3083568p3083568.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>