Details
-
Type: Bug
-
Status: Closed
-
Priority: 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:HideSome 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);
}
}
}
}ShowSome 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.
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.
-
Hide
- Case9977Example.war
- 8.17 MB
- Arran Mccullough
-
- META-INF/MANIFEST.MF 0.1 kB
- META-INF/context.xml 0.1 kB
- WEB-INF/classes/.../SortableList.class 1 kB
- WEB-INF/classes/.../TableBean$1.class 2 kB
- WEB-INF/.../TableBean$InventoryItem.class 2 kB
- WEB-INF/classes/.../sortable/TableBean.class 4 kB
- WEB-INF/faces-config.xml 0.8 kB
- WEB-INF/lib/FastInfoset.jar 285 kB
- WEB-INF/lib/backport-util-concurrent.jar 319 kB
- WEB-INF/lib/commons-beanutils.jar 226 kB
- WEB-INF/lib/commons-collections.jar 558 kB
- WEB-INF/lib/commons-digester.jar 140 kB
- WEB-INF/lib/commons-discovery.jar 75 kB
- WEB-INF/lib/commons-el.jar 110 kB
- WEB-INF/lib/commons-fileupload.jar 56 kB
- WEB-INF/lib/commons-lang.jar 240 kB
- WEB-INF/lib/commons-logging.jar 52 kB
- WEB-INF/lib/icefaces-comps.jar 3.16 MB
- WEB-INF/lib/icefaces-facelets.jar 592 kB
- WEB-INF/lib/icefaces.jar 1.21 MB
- WEB-INF/lib/jsf-api-1.2.jar 355 kB
- WEB-INF/lib/jsf-impl-1.2.jar 837 kB
- WEB-INF/lib/jstl.jar 20 kB
- WEB-INF/web.xml 4 kB
- welcomeICEfaces.xhtml 7 kB
Activity
- All
- Comments
- History
- Activity
- Remote Attachments
- Subversion
Fix added to Trunk.
Command: Commit
Modified: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\component\src\com\icesoft\faces\component\ext\RowSelector.java
Sending content: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\component\src\com\icesoft\faces\component\ext\RowSelector.java
Completed: At revision: 25904