diff options
author | Matti Tahvonen <matti.tahvonen@itmill.com> | 2007-11-02 13:24:54 +0000 |
---|---|---|
committer | Matti Tahvonen <matti.tahvonen@itmill.com> | 2007-11-02 13:24:54 +0000 |
commit | 211fb761cdb6246e87e9b7e404e76dfa4a2da13c (patch) | |
tree | ea3f91bd2984c870fe48929964cd7f3ab0b72c4f | |
parent | dd918348e4bd73613787f58c85dfcf4b8c026f77 (diff) | |
download | vaadin-framework-211fb761cdb6246e87e9b7e404e76dfa4a2da13c.tar.gz vaadin-framework-211fb761cdb6246e87e9b7e404e76dfa4a2da13c.zip |
IScrollTable: allow clearing content totally
svn changeset:2686/svn branch:trunk
-rw-r--r-- | src/com/itmill/toolkit/terminal/gwt/client/ui/IScrollTable.java | 11 |
1 files changed, 9 insertions, 2 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 d6962553ea..d3976999a9 100644 --- a/src/com/itmill/toolkit/terminal/gwt/client/ui/IScrollTable.java +++ b/src/com/itmill/toolkit/terminal/gwt/client/ui/IScrollTable.java @@ -285,8 +285,15 @@ public class IScrollTable extends Composite implements Table, ScrollListener, * amount of rows in data set */ private void updateBody(UIDL uidl, int firstRow, int reqRows) { - if (uidl == null || reqRows < 1) + if (uidl == null || reqRows < 1) { + // container is empty, remove possibly existing rows + if(firstRow < 0) { + while(tBody.getLastRendered() > tBody.firstRendered) + tBody.unlinkRow(false); + tBody.unlinkRow(false); + } return; + } tBody.renderRows(uidl, firstRow, reqRows); @@ -1517,7 +1524,7 @@ public class IScrollTable extends Composite implements Table, ScrollListener, } /** - * This mehtod is used to instantiate new rows for this table. It + * This method is used to instantiate new rows for this table. It * automatically sets correct widths to rows cells and assigns correct * client reference for child widgets. * |