You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Jamie Orchard-Hays <ja...@dang.com> on 2004/01/05 16:57:29 UTC

Re: finishLoad or attach/detach

Just to add...

Pages also have an initialize() method, which you do *not* want to use. Call
initialize to set your property to whatever you want it to be (usually null)
when you are *finished* with the page and it gets sent back to the pool. You
only need to use this method when you define your properties in the java
file. Normally, and whenever possible, define your properties in the .page
file so you don't need to deal with initialize().

Also, when creating your own objects (.jwc),
PageRenderListener/pageBeginRender() won't work for you. The order is not
specified, and more than likely (as I found through experience) you'll get
the wrong order in your page. For a custom component, you'll need to do some
kind of lazy loading for initialization (ie, off of a property).

Jamie
----- Original Message ----- 
From: "Erik Hatcher" <er...@ehatchersolutions.com>
To: "Tapestry users" <ta...@jakarta.apache.org>
Sent: Wednesday, December 31, 2003 7:19 AM
Subject: Re: finishLoad or attach/detach


> On Dec 31, 2003, at 5:08 AM, Fabrizio Fabbri wrote:
> > Sorry for my newbie question: what the best pratice for inizialize a
> > property-specification  not persistent with complex data like a object
> > with Collection and custom Type?
>
> Implement PageRenderListener and do it in pageBeginRender.  Make an
> abstract setter for that property, and call it.
>
> Erik
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>


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