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. Item.java
        0.5 kB
        Arran Mccullough
      3. TestBean.java
        0.9 kB
        Arran Mccullough
      4. welcomeICEfaces.xhtml
        0.7 kB
        Arran Mccullough

        Issue Links

          Activity

          Arran Mccullough created issue -
          Arran Mccullough made changes -
          Field Original Value New Value
          Attachment DualList-error.txt [ 12871 ]
          Attachment welcomeICEfaces.xhtml [ 12872 ]
          Attachment TestBean.java [ 12873 ]
          Arran Mccullough made changes -
          Attachment Item.java [ 12874 ]
          Arran Mccullough made changes -
          Summary DualList throws NullPointerException when using anything other than a String for ist values DualList throws NullPointerException when using anything other than a String for list values
          Salesforce Case [5007000000FaMQl]
          Brad Kroeger made changes -
          Assignee Brad Kroeger [ brad.kroeger ] Carlo Guglielmin [ carlo.guglielmin ]
          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.
          Carlo Guglielmin made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Carlo Guglielmin made changes -
          Fix Version/s EE-2.0.0.Beta1 [ 10254 ]
          Carlo Guglielmin made changes -
          Link This issue duplicates IPCK-230 [ IPCK-230 ]
          Carlo Guglielmin made changes -
          Link This issue is duplicated by IPCK-230 [ IPCK-230 ]
          Ken Fyten made changes -
          Status Resolved [ 5 ] Closed [ 6 ]

            People

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

              Dates

              • Created:
                Updated:
                Resolved: