summaryrefslogtreecommitdiffstats
path: root/src/com/itmill/toolkit/ui/Table.java
diff options
context:
space:
mode:
authorMatti Tahvonen <matti.tahvonen@itmill.com>2007-06-12 14:10:14 +0000
committerMatti Tahvonen <matti.tahvonen@itmill.com>2007-06-12 14:10:14 +0000
commit8d034f682c51aa7b91e4278ce916e9bb9fdb3ae2 (patch)
tree0dd28daa64493299dd9cd133f49f4baabc07fdd5 /src/com/itmill/toolkit/ui/Table.java
parent6f8e96f365ea152032ba2346f4dfeaf315c9cd74 (diff)
downloadvaadin-framework-8d034f682c51aa7b91e4278ce916e9bb9fdb3ae2.tar.gz
vaadin-framework-8d034f682c51aa7b91e4278ce916e9bb9fdb3ae2.zip
draft of scroll table and some other enhancements
svn changeset:1685/svn branch:trunk
Diffstat (limited to 'src/com/itmill/toolkit/ui/Table.java')
-rw-r--r--src/com/itmill/toolkit/ui/Table.java15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/com/itmill/toolkit/ui/Table.java b/src/com/itmill/toolkit/ui/Table.java
index 071fe84169..d90f6da390 100644
--- a/src/com/itmill/toolkit/ui/Table.java
+++ b/src/com/itmill/toolkit/ui/Table.java
@@ -28,6 +28,7 @@
package com.itmill.toolkit.ui;
+import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
@@ -1495,8 +1496,8 @@ public class Table extends Select implements Action.Container,
target.addAttribute("caption",
(String) cells[CELL_HEADER][i]);
}
+ target.addAttribute("key", Integer.parseInt(cells[CELL_KEY][i].toString()));
if (actionHandlers != null || isSelectable()) {
- target.addAttribute("key", (String) cells[CELL_KEY][i]);
if (isSelected(itemId) && keyIndex < selectedKeys.length) {
target.addAttribute("selected", true);
selectedKeys[keyIndex++] = (String) cells[CELL_KEY][i];
@@ -1505,7 +1506,7 @@ public class Table extends Select implements Action.Container,
// Actions
if (actionHandlers != null) {
- target.startTag("al");
+ ArrayList keys = new ArrayList();
for (Iterator ahi = actionHandlers.iterator(); ahi.hasNext();) {
Action[] aa = ((Action.Handler) ahi.next()).getActions(
itemId, this);
@@ -1513,10 +1514,10 @@ public class Table extends Select implements Action.Container,
for (int ai = 0; ai < aa.length; ai++) {
String key = actionMapper.key(aa[ai]);
actionSet.add(aa[ai]);
- target.addSection("ak", key);
+ keys.add(key);
}
}
- target.endTag("al");
+ target.addAttribute("al", keys.toArray());
}
// cells
@@ -1531,11 +1532,11 @@ public class Table extends Select implements Action.Container,
Component c = (Component) cells[CELL_FIRSTCOL
+ currentColumn][i];
if (c == null)
- target.addSection("label", "");
+ target.addText("");
else
c.paint(target);
} else
- target.addSection("label", (String) cells[CELL_FIRSTCOL
+ target.addText((String) cells[CELL_FIRSTCOL
+ currentColumn][i]);
}
@@ -1568,8 +1569,8 @@ public class Table extends Select implements Action.Container,
// Actions
if (!actionSet.isEmpty()) {
- target.startTag("actions");
target.addVariable(this, "action", "");
+ target.startTag("actions");
for (Iterator it = actionSet.iterator(); it.hasNext();) {
Action a = (Action) it.next();
target.startTag("action");