aboutsummaryrefslogtreecommitdiffstats
path: root/src/com/itmill/toolkit/ui/Table.java
diff options
context:
space:
mode:
authorMarc Englund <marc.englund@itmill.com>2007-11-02 14:13:07 +0000
committerMarc Englund <marc.englund@itmill.com>2007-11-02 14:13:07 +0000
commitcbcf59df3b8faddf9e2e967b43ece2f0f0987ab2 (patch)
tree00ada4dba709321340a51c02b56561a8511a0528 /src/com/itmill/toolkit/ui/Table.java
parent7bd32e78af369312078f63681ad6d7cbc1ec1dac (diff)
downloadvaadin-framework-cbcf59df3b8faddf9e2e967b43ece2f0f0987ab2.tar.gz
vaadin-framework-cbcf59df3b8faddf9e2e967b43ece2f0f0987ab2.zip
Null selection changes (#574)
svn changeset:2694/svn branch:trunk
Diffstat (limited to 'src/com/itmill/toolkit/ui/Table.java')
-rw-r--r--src/com/itmill/toolkit/ui/Table.java16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/com/itmill/toolkit/ui/Table.java b/src/com/itmill/toolkit/ui/Table.java
index 6d5a699116..5a9762db9e 100644
--- a/src/com/itmill/toolkit/ui/Table.java
+++ b/src/com/itmill/toolkit/ui/Table.java
@@ -1322,6 +1322,13 @@ public class Table extends AbstractSelect implements Action.Container,
*/
public void changeVariables(Object source, Map variables) {
+ if (!isSelectable() && variables.containsKey("selected")) {
+ // Not-selectable is a special case, AbstractSelect does not support
+ // TODO could be optimized.
+ variables = new HashMap(variables);
+ variables.remove("selected");
+ }
+
super.changeVariables(source, variables);
// Page start index
@@ -1522,9 +1529,16 @@ public class Table extends AbstractSelect implements Action.Container,
}
target.startTag("rows");
for (int i = 0; i < cells[0].length; i++) {
- target.startTag("tr");
Object itemId = cells[CELL_ITEMID][i];
+ if (!isNullSelectionAllowed() && getNullSelectionItemId() != null
+ && itemId == getNullSelectionItemId()) {
+ // Remove null selection item if null selection is not allowed
+ continue;
+ }
+
+ target.startTag("tr");
+
// tr attributes
if (rowheads) {
if (cells[CELL_ICON][i] != null) {