glassfish
  1. glassfish
  2. GLASSFISH-132

NSEE when using JSF selectItems with Collection

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 9.0pe
    • Fix Version/s: 9.0pe
    • Component/s: web_container
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: Linux

    • Issuezilla Id:
      132

      Description

      It is not possible to use h:selectOneMenu/f:selectItems combination with
      Collection passed as f:selectItems value parameter. It is probably caused by
      commit from 2005-11-02 11:47:25 to /jsf-ri/src/com/sun/faces/util/Util.java
      (version 1.176). next() method of iterator is called twice in one hasNext() loop.
      This particular code is self-explaining:
      --%<--
      while (elements.hasNext()) {
      Object element = elements.next();
      if (SelectItem.class.isInstance(element)) {
      list.add((SelectItem) elements.next());
      ...
      --%<--
      I am assigning it to the author of mentioned commit and adding also commit
      reviewer, I am not sure this is right category.

        Activity

        Hide
        Ryan Lubke added a comment -

        Created an attachment (id=24)
        Proposed fix for 132

        Show
        Ryan Lubke added a comment - Created an attachment (id=24) Proposed fix for 132
        Hide
        rogerk added a comment -

        r=rogerk

        Show
        rogerk added a comment - r=rogerk
        Hide
        Ryan Lubke added a comment -

        Fix committed to javaserverfaces-sources.
        Begin planning next binary integration.

        Show
        Ryan Lubke added a comment - Fix committed to javaserverfaces-sources. Begin planning next binary integration.
        Hide
        Ryan Lubke added a comment -

        Targeting to be available in b34 of GlassFish.

        Show
        Ryan Lubke added a comment - Targeting to be available in b34 of GlassFish.
        Hide
        Ryan Lubke added a comment -
            • Issue 151 has been marked as a duplicate of this issue. ***
        Show
        Ryan Lubke added a comment - Issue 151 has been marked as a duplicate of this issue. ***
        Hide
        Ryan Lubke added a comment -

        Workaround: Return an Array of SelectItems instead of a Collection.

        Show
        Ryan Lubke added a comment - Workaround: Return an Array of SelectItems instead of a Collection.

          People

          • Assignee:
            Ryan Lubke
            Reporter:
            martinadamek
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: