tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shawn Bayern <bay...@essentially.net>
Subject Re: Can't call the field from a specific table.
Date Mon, 13 Jan 2003 17:33:04 GMT
On Mon, 13 Jan 2003, John Engilis wrote:

> <c:forEach items="${Amenities.rows}" var="amenitiesRow">
> <c:if test="${amenitiesRow.golf == 'T'}"><td><li>Golf</li></td></c:if>
> </c:forEach>
> 
> When I attempt replacing "amenitiesRow.golf" with "amenitiesRow.oa.golf" it
> does not appear to recognize the data (I don't get any errors).

You really mean ${amenitiesRow["oa.golf"]}.  You need to use the []
operator when the name of your property contains a dot.

Your other two choices are to give aliases to the column names in your SQL
statement and to refer to rows by index.  But using ["oa.golf"] is
probably the easiest in your situation.

-- 
Shawn Bayern
"JSTL in Action"   http://www.manning.com/bayern


--
To unsubscribe, e-mail:   <mailto:taglibs-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:taglibs-user-help@jakarta.apache.org>


Mime
View raw message