users@glassfish.java.net

Re: c:forEach JSTL implemenation of GlassFish bug?

From: <glassfish_at_javadesktop.org>
Date: Fri, 31 Aug 2007 08:49:58 PDT

Test case is very simple.
I'd have the JSF ManagedBean with collection:

public class MyManagedBean {
   private Collection<String> myCollection = new ArrayList();
  
   public MyManagedBean() {
        myCollection.add("Hello1");
        myCollection.add("Hello2");
        myCollection.add("Hello3");
   }

   Collection<String> getMyCollection() {
      return myCollection;
   }
}

and the JSP:

<c:forEach items="#{MyManagedBean.myCollection}" var="tm_item" begin="2">
   ${tm_item}
</c:forEach>

But I see the first element ("Hello1"). Why ?
[Message sent by forum member 'akira_ag' (akira_ag)]

http://forums.java.net/jive/thread.jspa?messageID=233482