bobharner wrote
> <t:myComponent t:page="prop:componentResources.pageName"/>

By the way, just in case it helps someone. We have many pages passing "this"
page to the components. Now I know it can be retrieved using
ComponentResources. But, in order to avoid changing everything at once, I
figured out a way to let my component receive the page parameter (sent by
the existing pages) or just use the componentResources (implicit) property
to retrieve it:

class MyComponent {

        @Parameter(value = "componentResources.page")
        private MyPage page;

}

This way I can call myComponent with or without the page parameter:

// Old call, unnecessary parameter
<t:myComponent t:page="page"/>

// New call, no parameter (old calls will be refactored to this)
<t:myComponent/> 




--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Access-this-page-object-from-the-template-tp5719073p5719081.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

Reply via email to