From a59af5d4b303476d7d5daf889a0b00881ab31348 Mon Sep 17 00:00:00 2001 From: Henri Sara Date: Mon, 21 Nov 2011 14:20:17 +0000 Subject: [PATCH] #7908 added comments, don't call onScroll(null) if page length is zero and not a collapse/expand request svn changeset:22086/svn branch:6.7 --- .../vaadin/terminal/gwt/client/ui/VTreeTable.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/com/vaadin/terminal/gwt/client/ui/VTreeTable.java b/src/com/vaadin/terminal/gwt/client/ui/VTreeTable.java index 2e9dfd6164..c10e3e11a4 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VTreeTable.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VTreeTable.java @@ -96,19 +96,21 @@ public class VTreeTable extends VScrollTable { if (scrollPosition != scrollPosition2) { widget.setScrollPosition(scrollPosition); } + + // check which rows are needed from the server and initiate a + // deferred fetch + onScroll(null); } + // Recalculate table size if collapse request, or if page length is zero + // (not sent by server) and row count changes (#7908). if (collapseRequest || (!uidl.hasAttribute("pagelength") && getTotalRows() != oldTotalRows)) { /* + * Ensure that possibly removed/added scrollbars are considered. * Triggers row calculations, removes cached rows etc. Basically * cleans up state. Be careful if touching this, you will break * pageLength=0 if you remove this. */ - onScroll(null); - - /* - * Ensure that possibly removed/added scrollbars are considered. - */ triggerLazyColumnAdjustment(true); collapseRequest = false; -- 2.39.5