Re: Passing parent layout's object to nested page

2015-10-26 Thread g kuczera
For now I am using this strategy: @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 Figueire

Re: Passing parent layout's object to nested page

2015-10-23 Thread Thiago H de Paula Figueiredo
On Fri, 23 Oct 2015 12:28:09 -0200, g kuczera 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 t

Re: Passing parent layout's object to nested page

2015-10-23 Thread g kuczera
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 wa

Re: Passing parent layout's object to nested page

2015-10-22 Thread Thiago H de Paula Figueiredo
On Thu, 22 Oct 2015 06:48:34 -0200, g kuczera wrote: Hi Guys, Hi! I have a custom layout named LayoutM (java class and tml). It is used by my page - Activities - like that: http://tapestry.apache.org/schema/tapestry_5_3.xsd"; xmlns:p="tapestry:parameter"> And it implements

Re: Passing parent layout's object to nested page

2015-10-22 Thread Nathan Quirynen
Yes it will inject the component defined in your Activities .tml file. You have to use the t:id value as your property name though. But if you don't define a t:id on your component I think the first will have a t:id value the same as the components name, which in your case is layoutM. But to b

Re: Passing parent layout's object to nested page

2015-10-22 Thread g kuczera
Hi Nathan, To be honest, I just want to access the whole LayoutM object in the class, that uses it. Right now I am able to access Activities' fields from within http://tapestry.apache.org/schema/tapestry_5_3.xsd"; xmlns:p="tapestry:parameter"> successBlock is the field from Activit

Re: Passing parent layout's object to nested page

2015-10-22 Thread Nathan Quirynen
Hey, I'm not sure I totally understand your question, but if you just want to access your components properties in your page I think you can do the following (not tested): Inject your layout component in your page like following: @InjectComponent private LayoutM layoutM; public Object getSo