tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sakke Wiik" <sakke.w...@netikos.fi>
Subject Typecasting the variable inside a c:foreach-loop
Date Mon, 10 Feb 2003 08:52:43 GMT
I have a loop where I need to cast the looped objects if
they are of a certain type.
Can someone explain me if it's possible with any standard tags,
or how I could get hold of the storageObject object through some
java-code?

Here's the loop:

<c:forEach var="anObject" items="${objects}">
  <c:if test="${anObject.typeB}">
    Need to cast here <% TypeB typeB = anObject.typeB %>
  </c:if>
</c:forEach>




cheers,
Sakke Wiik


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


Mime
View raw message