ICEfaces
  1. ICEfaces
  2. ICE-6457

rowSelector throws a PropertyNotFoundException when selecting a row after a row has been deleted

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.8.2-EE-GA_P02
    • Fix Version/s: 2.0.1, EE-1.8.2.GA_P03
    • Component/s: ICE-Components
    • Labels:
      None
    • Environment:
      All

      Description

      Scenario: There is a dataTable that uses a rowSelector. When a row is selecting a user can delete this row. After the row is deleted when a user selects a new row a PropertyNotFoundException is thrown:

      Caused by: javax.el.PropertyNotFoundException: Target Unreachable, identifier 'item' resolved to null

      1. error-stacktrace.txt
        4 kB
        Arran Mccullough
      1. screenshot-01.png
        155 kB

        Activity

        Hide
        Arran Mccullough added a comment -

        Dev comment:

        I believe the problem is in this method of RowSelector:

        private void deselectPreviousSelection(UIData uiData, int rowindex) {
        Integer[] selection = new Integer[currentSelection.size()];
        currentSelection.toArray(selection);
        for (int i=0; i<selection.length; i++)

        { uiData.setRowIndex((selection[i]).intValue()); setValue(Boolean.FALSE); }

        uiData.setRowIndex(rowindex);
        }

        We have code to deselect the previously selected row, when a new row is selected. But, it's not checking if that row had since been removed. In this case, we need to check if the row is available, before calling setValue().

        Show
        Arran Mccullough added a comment - Dev comment: I believe the problem is in this method of RowSelector: private void deselectPreviousSelection(UIData uiData, int rowindex) { Integer[] selection = new Integer [currentSelection.size()] ; currentSelection.toArray(selection); for (int i=0; i<selection.length; i++) { uiData.setRowIndex((selection[i]).intValue()); setValue(Boolean.FALSE); } uiData.setRowIndex(rowindex); } We have code to deselect the previously selected row, when a new row is selected. But, it's not checking if that row had since been removed. In this case, we need to check if the row is available, before calling setValue().
        Hide
        yip.ng added a comment -

        Exception still occurs after fixing deselectPreviousSelection(). Now it is in processDecodes(). See screenshot 1.

        Show
        yip.ng added a comment - Exception still occurs after fixing deselectPreviousSelection(). Now it is in processDecodes(). See screenshot 1.
        Hide
        yip.ng added a comment -

        Revision: 23792


        Modified : /icefaces/trunk/icefaces/component/src/com/icesoft/faces/component/ext/RowSelector.java

        Revision: 23793


        Modified : /icefaces2/trunk/icefaces/compat/components/src/main/java/com/icesoft/faces/component/ext/RowSelector.java

        Show
        yip.ng added a comment - Revision: 23792 Modified : /icefaces/trunk/icefaces/component/src/com/icesoft/faces/component/ext/RowSelector.java Revision: 23793 Modified : /icefaces2/trunk/icefaces/compat/components/src/main/java/com/icesoft/faces/component/ext/RowSelector.java

          People

          • Assignee:
            yip.ng
            Reporter:
            Arran Mccullough
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: