> 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
> h
Thanks Taha,
Could you provide me with a short example on how to do it the parameter way
as well. Not sure I fully understand this method you described?
Many thanks
Rizwan
--
View this message in context:
http://tapestry.1045711.n5.nabble.com/Using-environment-to-access-object-in-component-
Sorry @InjectCompoment not @inject
Regards
Taha
On Jun 20, 2011, at 8:32 PM, Taha Tapestry wrote:
> 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
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()
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 compone
I agree that information can be passed both ways but the object is pushed on to
the environment by the parent/enclosing component
Regards
Taha
On Jun 20, 2011, at 7:16 PM, "Thiago H. de Paula Figueiredo"
wrote:
> On Mon, 20 Jun 2011 09:49:34 -0300, Taha Hafeez
> wrote:
>
>> Hi Rizwan,
>
On Mon, 20 Jun 2011 09:49:34 -0300, Taha Hafeez
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
Hi Rizwan,
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.
regards
Taha
On Mon, Jun 20, 2011 at 5:17 PM, Thia
On Mon, 20 Jun 2011 07:49:01 -0300, Rizwan wrote:
Hi
Hi!
I am trying to access a environment variable in a page. The variable is
pushed onto the environment from the enclosed component.
public class PageComponent {
@Inject
private Environment environment;
@Begin