Let me rephrase the question ....

Is there any limitation on using JSTL in Tiles ???

Rgs
albi

-----Original Message-----
From: Albrecht Leiprecht [mailto:[EMAIL PROTECTED] 
Sent: Thursday, August 11, 2005 3:28 PM
To: 'Struts Users Mailing List'
Subject: Conditionally show values in Tile (c:when?)

Hi all,

I have a tile that shows my default input row in a form. In case that I put
a value in FieldError, I want it to show it the errorMessage in red color.
So far so good. The values get to the tile (formRow)... and there it's
getting somewhat tricky. After reading a number of explanations, I
understands that struts.apache.org recommends to use JSTL whenever
possible... thus I use the c:when/c:otherwise construct like follows

<tiles:useAttribute id="errmsg" name="FieldError" scope="page"/>

<td>
  <%=errmsg.toString().length()%> 
  <%--correctly prints the expected value--%>
        
  <c:choose>
    <c:when test="${errmsg.toString().length() > 0}">
        <font color="#FF0000">
          <tiles:getAsString name="FieldError"/>
        </font>
    </c:when>
    <c:otherwise>
        <img src="/img/blank.gif" height="1" width="111">
        <%--unexpectedly always shows this--%>
    </c:otherwise>
  </c:choose>
</td>

Substitutes using logic:greaterThat are showing the same strange behavior...
Any Idea why this happens ? Any Tutorials, I could look up ?

TIA,
albi




---------------------------------------------------------------------
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]

Reply via email to