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

        Arran Mccullough created issue -
        Arran Mccullough made changes -
        Field Original Value New Value
        Salesforce Case [5007000000F6uyy]
        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().
        Arran Mccullough made changes -
        Attachment Case9696Example.war [ 12797 ]
        Attachment error-stacktrace.txt [ 12798 ]
        Arran Mccullough made changes -
        Attachment Case9696Example.zip [ 12799 ]
        Ken Fyten made changes -
        Fix Version/s 1.8.2-EE-GA_P03 [ 10251 ]
        Assignee Priority P1
        Assignee Yip Ng [ yip.ng ]
        Ken Fyten made changes -
        Fix Version/s 2.0.1 [ 10255 ]
        yip.ng made changes -
        Attachment screenshot-01.png [ 12807 ]
        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.
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #23792 Wed Jan 12 13:26:02 MST 2011 yip.ng ICE-6457: rowSelector throws a PropertyNotFoundException when selecting a row after a row has been deleted.
        Files Changed
        Commit graph MODIFY /icefaces/trunk/icefaces/component/src/com/icesoft/faces/component/ext/RowSelector.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #23793 Wed Jan 12 13:27:15 MST 2011 yip.ng ICE-6457: rowSelector throws a PropertyNotFoundException when selecting a row after a row has been deleted.
        Files Changed
        Commit graph MODIFY /icefaces2/trunk/icefaces/compat/components/src/main/java/com/icesoft/faces/component/ext/RowSelector.java
        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
        yip.ng made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Ken Fyten made changes -
        Assignee Priority P1
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved: