ICEfaces-EE
  1. ICEfaces-EE
  2. IPCK-237

DualList throws NullPointerException when using anything other than a String for list values

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.8.2.GA_P02, EE-2.0.0.Alpha1
    • Fix Version/s: EE-2.0.0.Beta1
    • Component/s: Facelet Components
    • Labels:
      None
    • Environment:
      All

      Description

      When using a more complex object for the values in the list, the DualList component throws a NullPointerException when the add or remove buttons are clicked. This exception is not thrown then the add all or remove all button is clicked.

      When using a String object it is working fine.
      1. DualList-error.txt
        10 kB
        Arran Mccullough
      2. TestBean.java
        0.9 kB
        Arran Mccullough
      3. welcomeICEfaces.xhtml
        0.7 kB
        Arran Mccullough
      4. Item.java
        0.5 kB
        Arran Mccullough

        Issue Links

          Activity

          Hide
          Carlo Guglielmin added a comment -

          r26240 - Fixed the dualList so arbitrary objects can be used instead of just Strings. Previously the wrong key for our selected map was used, since we would put the SelectItem object value, but perform a get on a toString of the SelectItem, so it really only worked for basic Strings. Now a toString of the object is used as the key in all places, and therefore adding/removing non-String objects works.

          Show
          Carlo Guglielmin added a comment - r26240 - Fixed the dualList so arbitrary objects can be used instead of just Strings. Previously the wrong key for our selected map was used, since we would put the SelectItem object value, but perform a get on a toString of the SelectItem, so it really only worked for basic Strings. Now a toString of the object is used as the key in all places, and therefore adding/removing non-String objects works.

            People

            • Assignee:
              Carlo Guglielmin
              Reporter:
              Arran Mccullough
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: