You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by kamiseq <ka...@gmail.com> on 2009/12/08 00:54:27 UTC
t5 Environment property
hi,
I really cant find any proper explanation of Environment and Environmental.
>From javadoc I understand that children components are provided with
Environmental service set by their parents so there is a way of passing data
around but I really dont get the "stack idea" of Environment service.
And then If I have 3 components such
<A>
<B>
<C>
</A>
and then A sets some data by Environment interface then B and C can access
the data. But I tried and set some data in B and then accessed it in C
component that is sibling of B and not its child.
What if I enclose compoennts like
<A id=aa>
<A id=ab>
<B>
<C>
</A>
<B>
<C>
</A>
will A.ab override the data that A.aa set just before??
can somebody point me to any information/tutorial/example about Environment
and Environmental
thanks
--
pozdrawiam
Paweł Kamiński
kamiseq@gmail.com
pkaminski.prv@gmail.com
______________________
Re: t5 Environment property
Posted by DH <ni...@gmail.com>.
http://tapestry.apache.org/tapestry5.1/guide/env.html
DH
http://www.gaonline.com.cn
----- Original Message -----
From: "kamiseq"
To: <us...@tapestry.apache.org>
Sent: Tuesday, December 08, 2009 7:54 AM
Subject: t5 Environment property
hi,
I really cant find any proper explanation of Environment and Environmental.
From javadoc I understand that children components are provided with
Environmental service set by their parents so there is a way of passing data
around but I really dont get the "stack idea" of Environment service.
And then If I have 3 components such
<A>
<B>
<C>
</A>
and then A sets some data by Environment interface then B and C can access
the data. But I tried and set some data in B and then accessed it in C
component that is sibling of B and not its child.
---------------------
Of course you can access if component B doesn't pop the data after it is rendered, but I would suggest you don't do that and always pop the data after component is rendered.
You should make component B and C decouple well. So just set data in Component A is ok.
What if I enclose compoennts like
<A id=aa>
<A id=ab>
<B>
<C>
</A>
<B>
<C>
</A>
will A.ab override the data that A.aa set just before??
--------------------------------------------
Yes, it would overwrite the data.
can somebody point me to any information/tutorial/example about Environment
and Environmental
thanks
--
pozdrawiam
Paweł Kamiński
kamiseq@gmail.com
pkaminski.prv@gmail.com
______________________