You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Jonathan O'Connor <Jo...@xcom.de> on 2004/11/24 16:05:58 UTC

Re: Initializing persistent component properties. [auf Viren geprueft]

Christian,
Can you use some sort of lazy initialization to wait as long as possible?
Ciao,
Jonathan O'Connor
XCOM Dublin



Christian.Haselbach@tngtech.com 
24/11/2004 14:36
Please respond to
"Tapestry users" <ta...@jakarta.apache.org>


To
Tapestry users <ta...@jakarta.apache.org>
cc

Subject
Re: Initializing persistent component properties. [auf Viren geprueft]






Quoting "Filip S. Adamsen" <fi...@stubkjaer-adamsen.dk>:

> Just implement org.apache.tapestry.event.PageRenderListener and do your
> stuff in the pageBeginRender method.

Been there, done that, no shirt. ;)

Ok, things are a little bit more complicated. The component itself is
used at a later point and the corresponding parameter is set later, too.
Hence, the pageBeginRender method is called to early. The prepareForRender
method would be a good time to check the state of the variable and set
it. I can indeed check it but not set it, because it is locked.

Regards,
Christian

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





*** XCOM AG Legal Disclaimer ***

Diese E-Mail einschlie?lich ihrer Anhange ist vertraulich und ist allein fur den Gebrauch durch den vorgesehenen Empfanger bestimmt. Dritten ist das Lesen, Verteilen oder Weiterleiten dieser E-Mail untersagt. Wir bitten, eine fehlgeleitete E-Mail unverzuglich vollstandig zu loschen und uns eine Nachricht zukommen zu lassen.

This email may contain material that is confidential and for the sole use of the intended recipient. Any review, distribution by others or forwarding without express permission is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.

Re: Initializing persistent component properties. [auf Viren geprueft]

Posted by Jamie Orchard-Hays <ja...@dang.com>.
this is really the only way to accomplish what you want. 
pageBeginRender() won't work because you have no way of controlling 
what gets called first. You're left with a lazy initialization 
technique.


On Nov 24, 2004, at 10:05 AM, Jonathan O'Connor wrote:

> Christian,
> Can you use some sort of lazy initialization to wait as long as 
> possible?
> Ciao,
> Jonathan O'Connor
> XCOM Dublin
>
>
>
> Christian.Haselbach@tngtech.com
> 24/11/2004 14:36
> Please respond to
> "Tapestry users" <ta...@jakarta.apache.org>
>
>
> To
> Tapestry users <ta...@jakarta.apache.org>
> cc
>
> Subject
> Re: Initializing persistent component properties. [auf Viren geprueft]
>
>
>
>
>
>
> Quoting "Filip S. Adamsen" <fi...@stubkjaer-adamsen.dk>:
>
>> Just implement org.apache.tapestry.event.PageRenderListener and do 
>> your
>> stuff in the pageBeginRender method.
>
> Been there, done that, no shirt. ;)
>
> Ok, things are a little bit more complicated. The component itself is
> used at a later point and the corresponding parameter is set later, 
> too.
> Hence, the pageBeginRender method is called to early. The 
> prepareForRender
> method would be a good time to check the state of the variable and set
> it. I can indeed check it but not set it, because it is locked.
>
> Regards,
> Christian
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
>
>
>
> *** XCOM AG Legal Disclaimer ***
>
> Diese E-Mail einschlie?lich ihrer Anhange ist vertraulich und ist 
> allein fur den Gebrauch durch den vorgesehenen Empfanger bestimmt. 
> Dritten ist das Lesen, Verteilen oder Weiterleiten dieser E-Mail 
> untersagt. Wir bitten, eine fehlgeleitete E-Mail unverzuglich 
> vollstandig zu loschen und uns eine Nachricht zukommen zu lassen.
>
> This email may contain material that is confidential and for the sole 
> use of the intended recipient. Any review, distribution by others or 
> forwarding without express permission is strictly prohibited. If you 
> are not the intended recipient, please contact the sender and delete 
> all copies.


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