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 getSomeProperty() {
return layoutM.getSomeProperty();
}
${someProperty}
Or with the @Property annotation you can access its properties in your
page as following:
@Property
@InjectComponent
private LayoutM layoutM;
${layoutM.someProperty}
Nathan
On 22/10/15 10:48, g kuczera wrote:
Hi Guys,
I have a custom layout named LayoutM (java class and tml). It is used by my
page - Activities - like that:
<t:layoutM title="${message:site.title} - ${message:page.title}"
bodyClass="dashboard"
xmlns:t="http://tapestry.apache.org/schema/tapestry_5_3.xsd"
xmlns:p="tapestry:parameter">
<!--a lot of stuff -->
</t:layoutM>
And it implements some kind of interface (class LayoutM implements
CustomInterface).
Is there a way to pass LayoutM java class object,+
to Activities page? Activities page contains the field:
@Parameter(required=false)
private CustomInterface fieldName;
I saw
http://apache-tapestry-mailing-list-archives.1045711.n5.nabble.com/T5-passing-values-between-layout-component-and-page-td2412095.html
but this works in the opposite way.
Is something like that correct (if I put it below "a lot of stuff" line)?
<p:fieldName value=${this}></p:fieldName>
What I can see right now is the "this" being an instance of Activities
class. How can I get the parent layout's object?
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org