Ahah! Using #{colorval/text()} didnt work - but doing a jx:set in a
choose like you suggested works like a charm. I just did 2 chooses..
one for the background type (image or color) and one for the value.
Then all I had to do was:
<div style="...; background-${colortype}: ${colorval};">...</div>
Thanks for the help!
- Brent
On Thu, 9 Dec 2004 20:07:57 +0100, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
> If I remember correctly, the "problem" lies in the fact that you create the
> value of the variable between the <jx:set> tags. In that case you create a
> Node. If you create it in the value attribute, you create a string or text.
>
> You can try either of the following:
>
>
>
> > <jx:set var="colorval"><jx:choose><jx:when
> > test="${colors.get(block.getColor()).startsWith('/')}">backgro
> > und-image:
> > url('${
> > colors.get(block.getColor())}')</jx:when><jx:otherwise>backgro
> > und-color:
> > ${colors.get(block.getColor())}</jx:otherwise></jx:choose></jx:set>
> > VAL = ${colorval}
> > <div style="width: 25px; height: 25px; border: 1px solid
> > white; ${colorval};">
>
> <div style="width: 25px; height: 25px; border: 1px solid white;
> #{colorval/text()};"> (or the jexl equivalent)
>
> Or
>
> <jx:choose>
> <jx:when test="${colors.get(block.getColor()).startsWith('/')}">
> <jx:set var="colorval" value="background-image:
> url('${colors.get(block.getColor())}')"/>
> </jx:when>
> <jx:otherwise>
> <jx:set var="colorval" value="background-color:
> ${colors.get(block.getColor())}"/>
> </jx:otherwise>
> </jx:choose>
>
> VAL = ${colorval}
> <div style="width: 25px; height: 25px; border: 1px solid white;
> ${colorval};">
>
>
> HTH.
>
> Bye, Helma
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]