You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by nhhockeyplayer nashua <nh...@hotmail.com> on 2013/04/29 17:32:38 UTC
cant do if clause within a div - help
Hi Folks,
I am doing an if clause within an if clause and tapestry is barking at me with this error
The value of attribute "style" associated with an element type "div" must not contain the '<' character
<div id="sub" style="float: right;
<t:if test="adminLayout">
border-color: ${adminLayout.contentColor};
background-color: ${adminLayout.dividerBackGroundColor};
<p:else>
border-color: #FFA200;
background-color: #eeeeee;
</p:else>
</t:if>
right: 0px;">
any ideas how to beat this ?
Best regards
and thanks... KEN
Re: cant do if clause within a div - help
Posted by Michael Prescott <mi...@gmail.com>.
The template has to be valid XML, so the <t:if> component won't really help
you here. One thing to do would be to assemble the style in the backing
Java class:
<div id="sub" style="float:right; ${computedStyle} right: 0px;"/>
public String getComputedStyle() {
// ...
}
On 29 April 2013 11:32, nhhockeyplayer nashua <nh...@hotmail.com>wrote:
> Hi Folks,
>
> I am doing an if clause within an if clause and tapestry is barking at me
> with this error
>
> The value of attribute "style" associated with an element type "div" must
> not contain the '<' character
>
> <div id="sub" style="float: right;
> <t:if test="adminLayout">
> border-color: ${adminLayout.contentColor};
> background-color:
> ${adminLayout.dividerBackGroundColor};
> <p:else>
> border-color: #FFA200;
> background-color: #eeeeee;
> </p:else>
> </t:if>
> right: 0px;">
>
> any ideas how to beat this ?
>
> Best regards
> and thanks... KEN
RE: cant do if clause within a div - help
Posted by nhhockeyplayer nashua <nh...@hotmail.com>.
Thanks friend... that worked out fine.