At 16:21 +0100 5/14/02, Liam wrote:
>Hi
>
>We have been trying unsuccessfully to iterate over an ArrayList 
>object using the JSTL tag forEach.
>
>We think it could be a bug, but then we may be  using it wrong :-). 
>Although we have successfully managed to use forEach for iterating 
>over Collections (which are in a bean).
>
>this is out code snippet
>
>                <%
>                   ArrayList classifiers = Classifier.DA.getAll();

request.setAttribute ("classifiers", classifiers);

I dunno if that's really the "right" way to do it, but it works for me.
I'd be glad to know if there's an approved way, if this isn't it.

>                 %>
>                     <c:forEach var="classifier" items="$classifiers" 
>varStatus="status" >
>                         <option>
>                           <c:out value="${classifier.name()}"/>
>                         </option>
>                     </c:forEach>
>
>Any help/advice on this is much appreciated!!!
>
>Thanks
>
>Liam.
>com21.com
>Temp. contractor.


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to