Thanks for the quick response Michael.  The reason the CSS class name needs
to be present in the tml is that I am not in control of the CSS / overall
look of the app, and some of the CSS / front-end people may not necessarily
know where to look within the java code.  I guess if no other solutions are
apparent I can use the property approach.

Regards,
Jim.

-----Original Message-----
From: Michael Gentry [mailto:mgen...@masslight.net] 
Sent: 13 July 2010 16:48
To: Tapestry users
Subject: Re: Conditional class for body

Hi Jim,

I've used class="${xyzClass}" before in the past.  Then implemented
getXyzClass() in my .java.  You said it was important to not be in the
Java for you and had to be in the TML?  Why is it that important when
both would require a WAR redeploy in a real production environment?

mrg


On Tue, Jul 13, 2010 at 11:41 AM, Jim O'Callaghan
<j...@peritussolutions.com> wrote:
> I've run in to a situation where the CSS class used for the body of my
> layout.tml varies depending on certain conditions.  I've tried using
> variously:
>
>
>
> <body t:class=<t:if test="xyzTest" negate="true">'xyzClass'</t:if>>
>
>
>
> Or:
>
>
>
> <t:if test=" xyzTest ">
>
>                                <body class="'xyzClass'">
>
>                <p:else>
>
>                                <body>
>
>                </ p:else>
>
>    </t:if>
>
>
>
> . and several other permutations without success - I am getting variations
> on parse errors with the general theme that class parameters cannot
contain
> quotes, or that body tag must be accompanied by closing body tag etc.
>
>
>
> Can anyone suggest a working approach to this simple use case?  It's
> important to be able to have the CSS class explicitly in the tml, and not
> buried in a java property.
>
>
>
> Thanks,
>
> Jim.
>
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to