From 211fb761cdb6246e87e9b7e404e76dfa4a2da13c Mon Sep 17 00:00:00 2001 From: Matti Tahvonen Date: Fri, 2 Nov 2007 13:24:54 +0000 Subject: [PATCH] IScrollTable: allow clearing content totally svn changeset:2686/svn branch:trunk --- .../toolkit/terminal/gwt/client/ui/IScrollTable.java | 11 +++++++++-- 1 file 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. * -- 2.39.5