summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorshoward <showard@592f7852-d20e-0410-864c-8624ca9c26a4>2008-10-23 00:42:52 +0000
committershoward <showard@592f7852-d20e-0410-864c-8624ca9c26a4>2008-10-23 00:42:52 +0000
commit38d7b32a12c7538c12efe469b1fec0d54a9d2a4b (patch)
treeadb198c8f5a064c302d4e379728926891d76d60f
parent75aea62fd1414b92ed6e90240f00aa859139df36 (diff)
TableDecorator needs to create a DynamicTableSelectionManager for "select all" to work correctly.
git-svn-id: svn://test.kernel.org/autotest/trunk@2328 592f7852-d20e-0410-864c-8624ca9c26a4
-rw-r--r--frontend/client/src/autotest/common/table/SelectionManager.java8
-rw-r--r--frontend/client/src/autotest/common/table/TableDecorator.java2
2 files changed, 3 insertions, 7 deletions
diff --git a/frontend/client/src/autotest/common/table/SelectionManager.java b/frontend/client/src/autotest/common/table/SelectionManager.java
index 1c10e35c..517e8795 100644
--- a/frontend/client/src/autotest/common/table/SelectionManager.java
+++ b/frontend/client/src/autotest/common/table/SelectionManager.java
@@ -90,7 +90,7 @@ public class SelectionManager implements TableWidgetFactory, TableWidgetClickLis
* Select all objects in the table.
*/
public void selectAll() {
- selectObjects(attachedTable.getAllRows());
+ selectVisible();
}
public void deselectAll() {
@@ -100,11 +100,7 @@ public class SelectionManager implements TableWidgetFactory, TableWidgetClickLis
}
public void selectVisible() {
- List<JSONObject> rowsToAdd = new ArrayList<JSONObject>();
- for (int i = 0; i < attachedTable.getRowCount(); i++) {
- rowsToAdd.add(attachedTable.getRow(i));
- }
- selectObjects(rowsToAdd);
+ selectObjects(attachedTable.getAllRows());
}
public void toggleSelected(JSONObject object) {
diff --git a/frontend/client/src/autotest/common/table/TableDecorator.java b/frontend/client/src/autotest/common/table/TableDecorator.java
index ae3892cc..7b889732 100644
--- a/frontend/client/src/autotest/common/table/TableDecorator.java
+++ b/frontend/client/src/autotest/common/table/TableDecorator.java
@@ -69,7 +69,7 @@ public class TableDecorator extends Composite implements DynamicTableListener {
}
public SelectionManager addSelectionManager(boolean selectOnlyOne) {
- selectionManager = new SelectionManager(dataTable, selectOnlyOne);
+ selectionManager = new DynamicTableSelectionManager(dataTable, selectOnlyOne);
dataTable.addListener(this);
return selectionManager;
}