struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Albrecht Leiprecht" <aleipre...@t-online.de>
Subject RE: Conditionally show values in Tile (c:when?)
Date Thu, 11 Aug 2005 14:30:45 GMT
Just did the following:
<%@ taglib uri="/WEB-INF/c.tld" prefix="c" %>

<%
	int errmsglength = 5;
%>


Further down:

<c:if test="${errmsglength > 1}">...</c:if>

One would expect to see the 3 dots ... but nada ...
And yes ...the taglib is loaded in the first line of the file ...Funky
...isn't it ?


I'm using 5.0.x Tomcat, 1.2.7 Struts and I'm unsure what version 
of the JSTL libs, but other stuff like fmt and so on seems to work


Rgds
Albi

Ps: I'll do some testing later, why JSTL didn't work 


-----Original Message-----
From: Dave Newton [mailto:newton@pingsite.com] 
Sent: Thursday, August 11, 2005 4:12 PM
To: Struts Users Mailing List
Subject: Re: Conditionally show values in Tile (c:when?)

Greg Reddin wrote:

> Can you do toString() in EL?  I thought you could only access bean 
> properties.  If so, you'd need to provide a getLength() method on your 
> errormsg bean and do this
>
>     <c:when test="${errmsg.length > 0}">

Or <c:if test="${not empty errmsg}">...</c:if> depending on how you're 
filling errmsg and remove some additional clutter from the JSP.

Dave



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message