On Mon, 21 Mar 2011 14:27:35 -0300, stephanos2k
<stephan.beh...@googlemail.com> wrote:
In my Layout I'd like to distinguish between 2 states (let's just say
red or blue). Those are known/set by each page individually - it
inherits from BasePageRed or BasePageBlue (which go back to BasePage
where the parameter Col is
defined).
How do I 'get' the parameter value from the BasePage (class) to the
Layout (tml)?
PS: I am aware that I can set the parameter in Page.tml - but I don't
want to repeat myself in each file.
Abusing class hierarchy, for me, is way worse than adding a single
parameter to a component use.
Another option (preferred) is to define an annotation and use
ComponentResources.getPage() to get the page instance and check if that
annotation is there or not.
--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
and instructor
Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org