You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by "Kolesnikov, Alexander GNI" <Al...@CIGNA.com> on 2007/03/15 11:23:59 UTC

Why initialize() is deprecated

Hi All,

Could you please tell me why initialize() method is deprecated in
Tapestry 4? I have to use a couple of properties in the 'old' way
because my getters and setters do something, they don't just access a
private member. And in initialize() I set the corresponding private
members to null as a cleanup before putting the page into the pool. Why
shouldn't I do this in Tapestry 4?

Thanks,

Alexander 

------------------------------------------------------------------------------
CONFIDENTIALITY NOTICE: If you have received this email in error, please immediately notify the sender by e-mail at the address shown.  This email transmission may contain confidential information.  This information is intended only for the use of the individual(s) or entity to whom it is intended even if addressed incorrectly.  Please delete it from your files if you are not the intended recipient.  Thank you for your compliance.  Copyright 2007 CIGNA
==============================================================================

Re: Why initialize() is deprecated

Posted by Sam Gendler <sg...@ideasculptor.com>.
Because they are perfectly usable alternatives that accomplish the
same thing, so the initialize() method isn't needed any longer and may
be removed in a future release.  You can initialize params when a page
is first attached to the request via the PageAttachListener interface,
and you can clean up data structures and such after a request via the
PageDetachListener interface.  You also have PageBeginRenderListener
and PageEndRenderListener, for dealing with such problems on a
per-cycle basis instead of per-request.

--sam


On 3/15/07, Kolesnikov, Alexander      GNI
<Al...@cigna.com> wrote:
> Hi All,
>
> Could you please tell me why initialize() method is deprecated in
> Tapestry 4? I have to use a couple of properties in the 'old' way
> because my getters and setters do something, they don't just access a
> private member. And in initialize() I set the corresponding private
> members to null as a cleanup before putting the page into the pool. Why
> shouldn't I do this in Tapestry 4?
>
> Thanks,
>
> Alexander
>
> ------------------------------------------------------------------------------
> CONFIDENTIALITY NOTICE: If you have received this email in error, please immediately notify the sender by e-mail at the address shown.  This email transmission may contain confidential information.  This information is intended only for the use of the individual(s) or entity to whom it is intended even if addressed incorrectly.  Please delete it from your files if you are not the intended recipient.  Thank you for your compliance.  Copyright 2007 CIGNA
> ==============================================================================
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org