struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Albrecht Leiprecht" <>
Subject Conditionally show values in Tile (c:when?)
Date Thu, 11 Aug 2005 13:28:28 GMT
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 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"/>

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

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


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message