tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From (David M. Karr)
Subject Re: forEach Problem
Date Mon, 20 Jan 2003 20:43:27 GMT
>>>>> "Alejandra" == Alejandra De Leon <> writes:

    Alejandra> I'm having a problem with foreach tag using begin and end attributes.
    Alejandra> The code I have is:
    Alejandra> <c:forEach begin="${erliestYear}" end="${latestYear}" varStatus="status">
    Alejandra>          <option value="<c:out value='${status.index}'/>"<c:if
    Alejandra> test="${status.index == statisticsForm.toYear}"><c:out value="
    Alejandra> selected"/></c:if>><c:out value='${status.index}'/></option>
    Alejandra> </c:forEach>

    Alejandra> and when earliestYear it's equals to lastYear It doesn't display the option
    Alejandra> tag.
    Alejandra> I suppose that it should be like in Java that runs the loop once.

    Alejandra> This is a bug or it's not possible to use a <foreach> only to run

Just make "end" equal to "${latestYear + 1}".

David M. Karr          ; Java/J2EE/XML/Unix/C++   ; SCJP; SCWCD

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

View raw message