aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/com/itmill/toolkit/terminal/gwt/client/ui/IScrollTable.java12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/com/itmill/toolkit/terminal/gwt/client/ui/IScrollTable.java b/src/com/itmill/toolkit/terminal/gwt/client/ui/IScrollTable.java
index 8dd88b4c7b..25209a1431 100644
--- a/src/com/itmill/toolkit/terminal/gwt/client/ui/IScrollTable.java
+++ b/src/com/itmill/toolkit/terminal/gwt/client/ui/IScrollTable.java
@@ -156,12 +156,15 @@ public class IScrollTable extends Composite implements Table, ScrollListener,
immediate = uidl.getBooleanAttribute("immediate");
final int newTotalRows = uidl.getIntAttribute("totalrows");
if (newTotalRows != totalRows) {
- totalRows = newTotalRows;
if (tBody != null) {
+ if (totalRows == 0) {
+ tHead.clear();
+ }
initializedAndAttached = false;
initialContentReceived = false;
isNewBody = true;
}
+ totalRows = newTotalRows;
}
pageLength = uidl.getIntAttribute("pagelength");
@@ -1273,6 +1276,13 @@ public class IScrollTable extends Composite implements Table, ScrollListener,
availableCells.put("0", new RowHeadersHeaderCell());
}
+ public void clear() {
+ super.clear();
+ availableCells.clear();
+ availableCells.put("0", new RowHeadersHeaderCell());
+
+ }
+
public void updateCellsFromUIDL(UIDL uidl) {
Iterator it = uidl.getChildIterator();
HashSet updated = new HashSet();