There are two ways of doing this One way is to use parameters. Create a parameter display in the component which will be readonly for the page and to which the component assigns a value like the index parameter of the loop
Second is to create an interface Displayable having a method getDisplay() and have the component implement that interface. In the page you can later use @inject private MyComponent component; public Display getDisplay(){ return ((Displayable)component).getDisplay(); } Regards Taha On Jun 20, 2011, at 8:10 PM, Rizwan <rizla2...@gmail.com> wrote: > I have to push the object in the component as the information I need passed > back to the page is only in the component not the page. > > From reading the tapestry API it seems that it is more cleaner to push and > pop the objects in the same component rather than popping and pushing in > different components? > > Are there any alternatives or good ways of doing this. The only way I can > think off is injecting the component into the page e.g > > InjectComponent > private Component > > public getDisplay () { > component.getDisplay(); > > } > > Thanks > > Rizwan > > > -- > View this message in context: > http://tapestry.1045711.n5.nabble.com/Using-environment-to-access-object-in-component-from-calling-page-tp4505889p4506608.html > Sent from the Tapestry - User mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > 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