ICEfaces
  1. ICEfaces
  2. ICE-6719

Multiple row selection occuring on sortable dataTable with multiple=false

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.8.2-EE-GA_P02
    • Fix Version/s: EE-1.8.2.GA_P04
    • Component/s: ICE-Components
    • Labels:
      None
    • Environment:
      All
    • Workaround Exists:
      Yes
    • Workaround Description:
      Hide
      Some application level code can resolve this issue. In the selectionListener method, get a reference to the currently selected row. Iterate through the list if an item in the list has its selected value set to true and it is not the currently selected item, then set this selected value to false.

      Sample code from test case:

          public void rowSelected(RowSelectorEvent event){
              InventoryItem selected = (InventoryItem)carInventory[event.getRow()];
              for(int i=0;i<carInventory.length;i++){
                  InventoryItem ii = (InventoryItem)carInventory[i];
                  if(ii.isSelected()){
                     if(selected.getStock() != ii.getStock()){
                         ii.setSelected(false);
                     }
                  }
              }
          }
      Show
      Some application level code can resolve this issue. In the selectionListener method, get a reference to the currently selected row. Iterate through the list if an item in the list has its selected value set to true and it is not the currently selected item, then set this selected value to false. Sample code from test case:     public void rowSelected(RowSelectorEvent event){         InventoryItem selected = (InventoryItem)carInventory[event.getRow()];         for(int i=0;i<carInventory.length;i++){             InventoryItem ii = (InventoryItem)carInventory[i];             if(ii.isSelected()){                if(selected.getStock() != ii.getStock()){                    ii.setSelected(false);                }             }         }     }

      Description

      One a dataTable that has column sorting setup, rowSelection, and a paginator, it is possible to have it select multiple rows when column sorting is done.

      Steps to reproduce issue on attached test case:
       - Run test case.
       - Select the first row (Stock #57605)
       - Sort the Model column
       - Select the first row after sorting (Stock #58265)
       - Sort the Stock # column.
       - Both the rows are now shown to be selected even with multiple=false set for the rowSelector.

        Activity

        Repository Revision Date User Message
        ICEsoft Public SVN Repository #25904 Tue Oct 11 19:19:00 MDT 2011 adnan.durrani Fix for ICE-6719 (Multiple row selection occuring on sortable dataTable with multiple=false)
        Files Changed
        Commit graph MODIFY /icefaces/trunk/icefaces/component/src/com/icesoft/faces/component/ext/RowSelector.java

          People

          • Assignee:
            Adnan Durrani
            Reporter:
            Arran Mccullough
          • Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: