You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Karthik N <ka...@gmail.com> on 2006/08/03 15:29:01 UTC
Tap 4.1 Migration - deprecated initialize()
We have some code in the initialize() method. Per the 4.1 doc initialize()
is deprecated and we've to move the code to pageBeginRender().
however we find that code in the pageBeginRender does **not** get invoked
for direct links, which is correct behavior.
and hence we end up with all sorts of issues due to uninitialized properties
when direct links are invoked.
so is it our improper usage of initialize(), or should initialize() not be
deprecated?!!
Thanks, Karthik
Re: Tap 4.1 Migration - deprecated initialize()
Posted by Karthik N <ka...@gmail.com>.
we were able to get most of our code outside of the initialize method. one
important learning, in trying to port the initialize() to pageBeginRender
- pageBeginRender never gets called for a DirectLink, but only for Form
Submits
On 8/4/06, Nick Westgate <ni...@key-planning.co.jp> wrote:
>
> Hi Chris.
>
> I don't know, you'd have to check the source, but finishLoad()doesn't
> really belong in this list because it's a method on IComponent, not IPage.
>
> Cheers,
> Nick.
>
>
> Chris Chiappone wrote:
> > I'm curious where does finishLoad fit into this order?
> >
> > On 8/3/06, Nick Westgate <ni...@key-planning.co.jp> wrote:
> >
> >>
> >> Hi Karthik.
> >>
> >> Expert or not, here's something I posted on the dev list recently.
> >> The +++ event was a possibility discussed for T4.1 final, the reason
> >> being that if you initialise in pageValidate, ExternalPages may break.
> >>
> >> Page event order:
> >>
> >> pageAttached
> >> pageValidate - check user is allowed to access page
> >> activateExternalPage - setup here - but only for external pages
> >> +++ pageInitialize - setup here - not called for rewind?
> >> pageBeginRender - setup here - but check for rewind
> >> pageEndRender
> >> pageDetached
> >>
> >> initialize() was called on page creation, and when pages were returned
> >> to the pool. I'm not sure of its current status, but it should really
> >> have been used only for static values, if at all. pageBeginRender() is
> >> the traditional location for per-page initialisation.
> >>
> >> Cheers,
> >> Nick.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
--
Thanks, Karthik
Re: Tap 4.1 Migration - deprecated initialize()
Posted by Nick Westgate <ni...@key-planning.co.jp>.
Hi Chris.
I don't know, you'd have to check the source, but finishLoad()doesn't
really belong in this list because it's a method on IComponent, not IPage.
Cheers,
Nick.
Chris Chiappone wrote:
> I'm curious where does finishLoad fit into this order?
>
> On 8/3/06, Nick Westgate <ni...@key-planning.co.jp> wrote:
>
>>
>> Hi Karthik.
>>
>> Expert or not, here's something I posted on the dev list recently.
>> The +++ event was a possibility discussed for T4.1 final, the reason
>> being that if you initialise in pageValidate, ExternalPages may break.
>>
>> Page event order:
>>
>> pageAttached
>> pageValidate - check user is allowed to access page
>> activateExternalPage - setup here - but only for external pages
>> +++ pageInitialize - setup here - not called for rewind?
>> pageBeginRender - setup here - but check for rewind
>> pageEndRender
>> pageDetached
>>
>> initialize() was called on page creation, and when pages were returned
>> to the pool. I'm not sure of its current status, but it should really
>> have been used only for static values, if at all. pageBeginRender() is
>> the traditional location for per-page initialisation.
>>
>> Cheers,
>> Nick.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Tap 4.1 Migration - deprecated initialize()
Posted by Chris Chiappone <ch...@gmail.com>.
I'm curious where does finishLoad fit into this order?
On 8/3/06, Nick Westgate <ni...@key-planning.co.jp> wrote:
>
> Hi Karthik.
>
> Expert or not, here's something I posted on the dev list recently.
> The +++ event was a possibility discussed for T4.1 final, the reason
> being that if you initialise in pageValidate, ExternalPages may break.
>
> Page event order:
>
> pageAttached
> pageValidate - check user is allowed to access page
> activateExternalPage - setup here - but only for external pages
> +++ pageInitialize - setup here - not called for rewind?
> pageBeginRender - setup here - but check for rewind
> pageEndRender
> pageDetached
>
> initialize() was called on page creation, and when pages were returned
> to the pool. I'm not sure of its current status, but it should really
> have been used only for static values, if at all. pageBeginRender() is
> the traditional location for per-page initialisation.
>
> Cheers,
> Nick.
>
>
> Karthik N wrote:
> > For now it appears that moving the code to pageValidate() might just do
> the
> > trick. But am a little uncertain about the page lifecycle
> >
> > Any expert-opinions?
> >
> > On 8/3/06, Karthik N <ka...@gmail.com> wrote:
> >
> >>
> >> I believe initialize is called when the page is infact retrieved from
> the
> >> pool. however pageBeginRender is called only if there's something to
> >> render. since for direct links pageBeginRender is not called, we're in
> a
> >> mess right now.
> >>
> >>
> >> On 8/3/06, Norbert Sándor <de...@erinors.com> wrote:
> >> >
> >> > As I remember (I used it very rarely) initialize() was called when
> the
> >> > page was put back into the pool.
> >> > So isn't PageDetachListener is more appropriate to replace
> >> initialize()?
> >> >
> >> > Sorry if I'm wrong :)
> >> >
> >> > Regards,
> >> > Norbi
> >> >
> >> > Karthik N wrote:
> >> > > We have some code in the initialize() method. Per the 4.1 doc
> >> > > initialize()
> >> > > is deprecated and we've to move the code to pageBeginRender().
> >> > >
> >> > > however we find that code in the pageBeginRender does **not** get
> >> > invoked
> >> > > for direct links, which is correct behavior.
> >> > >
> >> > > and hence we end up with all sorts of issues due to uninitialized
> >> > > properties
> >> > > when direct links are invoked.
> >> > >
> >> > > so is it our improper usage of initialize(), or should initialize()
> >> > > not be
> >> > > deprecated?!!
> >> > >
> >> > > Thanks, Karthik
> >> > >
> >> > >
> >> >
> >>
> ------------------------------------------------------------------------
> >> > >
> >> > > No virus found in this incoming message.
> >> > > Checked by AVG Free Edition.
> >> > > Version: 7.1.394 / Virus Database: 268.10.5/406 - Release Date:
> >> > 2006.08.02.
> >> > >
> >> > >
> >> >
> >> >
> >> > ---------------------------------------------------------------------
> >> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> >> > For additional commands, e-mail: users-help@tapestry.apache.org
> >> >
> >> >
> >>
> >>
> >> --
> >> Thanks, Karthik
> >>
> >
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
--
~chris
Re: Tap 4.1 Migration - deprecated initialize()
Posted by Nick Westgate <ni...@key-planning.co.jp>.
Hi Karthik.
Expert or not, here's something I posted on the dev list recently.
The +++ event was a possibility discussed for T4.1 final, the reason
being that if you initialise in pageValidate, ExternalPages may break.
Page event order:
pageAttached
pageValidate - check user is allowed to access page
activateExternalPage - setup here - but only for external pages
+++ pageInitialize - setup here - not called for rewind?
pageBeginRender - setup here - but check for rewind
pageEndRender
pageDetached
initialize() was called on page creation, and when pages were returned
to the pool. I'm not sure of its current status, but it should really
have been used only for static values, if at all. pageBeginRender() is
the traditional location for per-page initialisation.
Cheers,
Nick.
Karthik N wrote:
> For now it appears that moving the code to pageValidate() might just do the
> trick. But am a little uncertain about the page lifecycle
>
> Any expert-opinions?
>
> On 8/3/06, Karthik N <ka...@gmail.com> wrote:
>
>>
>> I believe initialize is called when the page is infact retrieved from the
>> pool. however pageBeginRender is called only if there's something to
>> render. since for direct links pageBeginRender is not called, we're in a
>> mess right now.
>>
>>
>> On 8/3/06, Norbert Sándor <de...@erinors.com> wrote:
>> >
>> > As I remember (I used it very rarely) initialize() was called when the
>> > page was put back into the pool.
>> > So isn't PageDetachListener is more appropriate to replace
>> initialize()?
>> >
>> > Sorry if I'm wrong :)
>> >
>> > Regards,
>> > Norbi
>> >
>> > Karthik N wrote:
>> > > We have some code in the initialize() method. Per the 4.1 doc
>> > > initialize()
>> > > is deprecated and we've to move the code to pageBeginRender().
>> > >
>> > > however we find that code in the pageBeginRender does **not** get
>> > invoked
>> > > for direct links, which is correct behavior.
>> > >
>> > > and hence we end up with all sorts of issues due to uninitialized
>> > > properties
>> > > when direct links are invoked.
>> > >
>> > > so is it our improper usage of initialize(), or should initialize()
>> > > not be
>> > > deprecated?!!
>> > >
>> > > Thanks, Karthik
>> > >
>> > >
>> >
>> ------------------------------------------------------------------------
>> > >
>> > > No virus found in this incoming message.
>> > > Checked by AVG Free Edition.
>> > > Version: 7.1.394 / Virus Database: 268.10.5/406 - Release Date:
>> > 2006.08.02.
>> > >
>> > >
>> >
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> > For additional commands, e-mail: users-help@tapestry.apache.org
>> >
>> >
>>
>>
>> --
>> Thanks, Karthik
>>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Tap 4.1 Migration - deprecated initialize()
Posted by Karthik N <ka...@gmail.com>.
For now it appears that moving the code to pageValidate() might just do the
trick. But am a little uncertain about the page lifecycle
Any expert-opinions?
On 8/3/06, Karthik N <ka...@gmail.com> wrote:
>
> I believe initialize is called when the page is infact retrieved from the
> pool. however pageBeginRender is called only if there's something to
> render. since for direct links pageBeginRender is not called, we're in a
> mess right now.
>
>
> On 8/3/06, Norbert Sándor <de...@erinors.com> wrote:
> >
> > As I remember (I used it very rarely) initialize() was called when the
> > page was put back into the pool.
> > So isn't PageDetachListener is more appropriate to replace initialize()?
> >
> > Sorry if I'm wrong :)
> >
> > Regards,
> > Norbi
> >
> > Karthik N wrote:
> > > We have some code in the initialize() method. Per the 4.1 doc
> > > initialize()
> > > is deprecated and we've to move the code to pageBeginRender().
> > >
> > > however we find that code in the pageBeginRender does **not** get
> > invoked
> > > for direct links, which is correct behavior.
> > >
> > > and hence we end up with all sorts of issues due to uninitialized
> > > properties
> > > when direct links are invoked.
> > >
> > > so is it our improper usage of initialize(), or should initialize()
> > > not be
> > > deprecated?!!
> > >
> > > Thanks, Karthik
> > >
> > >
> > ------------------------------------------------------------------------
> > >
> > > No virus found in this incoming message.
> > > Checked by AVG Free Edition.
> > > Version: 7.1.394 / Virus Database: 268.10.5/406 - Release Date:
> > 2006.08.02.
> > >
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
>
>
> --
> Thanks, Karthik
>
--
Thanks, Karthik
Re: Tap 4.1 Migration - deprecated initialize()
Posted by Karthik N <ka...@gmail.com>.
I believe initialize is called when the page is infact retrieved from the
pool. however pageBeginRender is called only if there's something to
render. since for direct links pageBeginRender is not called, we're in a
mess right now.
On 8/3/06, Norbert Sándor <de...@erinors.com> wrote:
>
> As I remember (I used it very rarely) initialize() was called when the
> page was put back into the pool.
> So isn't PageDetachListener is more appropriate to replace initialize()?
>
> Sorry if I'm wrong :)
>
> Regards,
> Norbi
>
> Karthik N wrote:
> > We have some code in the initialize() method. Per the 4.1 doc
> > initialize()
> > is deprecated and we've to move the code to pageBeginRender().
> >
> > however we find that code in the pageBeginRender does **not** get
> invoked
> > for direct links, which is correct behavior.
> >
> > and hence we end up with all sorts of issues due to uninitialized
> > properties
> > when direct links are invoked.
> >
> > so is it our improper usage of initialize(), or should initialize()
> > not be
> > deprecated?!!
> >
> > Thanks, Karthik
> >
> > ------------------------------------------------------------------------
> >
> > No virus found in this incoming message.
> > Checked by AVG Free Edition.
> > Version: 7.1.394 / Virus Database: 268.10.5/406 - Release Date:
> 2006.08.02.
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
--
Thanks, Karthik
Re: Tap 4.1 Migration - deprecated initialize()
Posted by Norbert Sándor <de...@erinors.com>.
As I remember (I used it very rarely) initialize() was called when the
page was put back into the pool.
So isn't PageDetachListener is more appropriate to replace initialize()?
Sorry if I'm wrong :)
Regards,
Norbi
Karthik N wrote:
> We have some code in the initialize() method. Per the 4.1 doc
> initialize()
> is deprecated and we've to move the code to pageBeginRender().
>
> however we find that code in the pageBeginRender does **not** get invoked
> for direct links, which is correct behavior.
>
> and hence we end up with all sorts of issues due to uninitialized
> properties
> when direct links are invoked.
>
> so is it our improper usage of initialize(), or should initialize()
> not be
> deprecated?!!
>
> Thanks, Karthik
>
> ------------------------------------------------------------------------
>
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.1.394 / Virus Database: 268.10.5/406 - Release Date: 2006.08.02.
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org