http://tapestry.apache.org/tapestry5.1/guide/env.html
DH http://www.gaonline.com.cn ----- Original Message ----- From: "kamiseq" To: <[email protected]> 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 [email protected] [email protected] ______________________
