For now I am using this strategy:
<t:layoutM t:id="myLayoutComponent" ... />

@InjectComponent
private LayoutM myLayoutComponent;

and it works well. Tomorrow I will be probably redesigning the app a little
bit, so I will give you my feedback about the Environment in the next few
days.

2015-10-23 18:23 GMT+02:00 Thiago H de Paula Figueiredo <thiag...@gmail.com>
:

> On Fri, 23 Oct 2015 12:28:09 -0200, g kuczera <gkucz...@gmail.com> wrote:
>
> For now I tried the last approach, (InjectContainer), but it throws
>> Caused by: java.lang.NullPointerException
>>     at
>>
>> org.apache.tapestry5.internal.transform.InjectContainerWorker$1$1.get(InjectContainerWorker.java:80)
>> It looks like it's not the proper way in my case. Trying other ways.
>> PS: Just wandering, if the container worker gets null, then it probably
>> means, that there is no container at all (for my current page, in which I
>> put the annotation).
>>
>
> You got it right. :) This will only work on components, not in pages,
> because pages don't have a container (parent). It would work from the
> Layout component to access the page on which it's used, for example.
>
> Have you tried the Environment?
>
>
> --
> Thiago H. de Paula Figueiredo
> Tapestry, Java and Hibernate consultant and developer
> http://machina.com.br
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>

Reply via email to