> I wouldn't that Environment is purely top-down. Of course, most of the time > it is. Sometimes information goes both ways. The Form component adds a > FormSupport object to the Environment and the form field components add > validation, event triggering, etc commands for Form to execute while > handling a form submission.
Just for clarity: While the information goes both ways, the form component remains in charge of the lifecycle. During rendering FormSupport is pushed in the Form component's beginRender and popped in it's cleanupRender, and in an action (form submit) FormSupport is pushed and popped from within the onAction event handler. The page or component containing the form has access to the FormSupport only when the form or one of its sub-components trigger an event between the time that the object was pushed and popped. Josh On Mon, Jun 20, 2011 at 6:46 AM, Thiago H. de Paula Figueiredo <thiag...@gmail.com> wrote: > On Mon, 20 Jun 2011 09:49:34 -0300, Taha Hafeez <tawus.tapes...@gmail.com> > wrote: > >> Hi Rizwan, > > Hi, guys! > >> Environment is used when a component wants to pass an object to the >> child/embedded component not other way around because of the reasons >> already mentioned by Thiago. If you describe the use case may be we can >> suggest you a better way. > > I wouldn't that Environment is purely top-down. Of course, most of the time > it is. Sometimes information goes both ways. The Form component adds a > FormSupport object to the Environment and the form field components add > validation, event triggering, etc commands for Form to execute while > handling a form submission. > > -- > Thiago H. de Paula Figueiredo > Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and > instructor > Owner, Ars Machina Tecnologia da Informação Ltda. > http://www.arsmachina.com.br > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org