]> source.dussan.org Git - vaadin-framework.git/commitdiff
avoiding timing issues with hosted mode
authorMatti Tahvonen <matti.tahvonen@itmill.com>
Wed, 10 Oct 2007 11:16:27 +0000 (11:16 +0000)
committerMatti Tahvonen <matti.tahvonen@itmill.com>
Wed, 10 Oct 2007 11:16:27 +0000 (11:16 +0000)
svn changeset:2483/svn branch:trunk

src/com/itmill/toolkit/terminal/gwt/client/ui/IScrollTable.java

index 3d631ead5141182be7dd4a039e6e1db368653bd5..5abbe6c095ef62eb5d89308a9d72865b19bd44e6 100644 (file)
@@ -413,6 +413,7 @@ public class IScrollTable extends Composite implements Table, ScrollListener,
        }
 
        protected void onDetach() {
+               rowRequestHandler.cancel();
                super.onDetach();
                // ensure that scrollPosElement will be detached
                if (scrollPositionElement != null) {
@@ -549,7 +550,7 @@ public class IScrollTable extends Composite implements Table, ScrollListener,
                                                        .setReqFirstRow(tBody.getLastRendered() + 1);
                                        rowRequestHandler
                                                        .setReqRows((int) (pageLength * CACHE_RATE));
-                                       rowRequestHandler.deferRowFetch();
+                                       rowRequestHandler.deferRowFetch(0);
                                }
                        }
                });
@@ -689,9 +690,14 @@ public class IScrollTable extends Composite implements Table, ScrollListener,
                private int reqFirstRow = 0;
                private int reqRows = 0;
 
+               
                public void deferRowFetch() {
+                       deferRowFetch(250);
+               }
+               
+               public void deferRowFetch(int msec) {
                        if (reqRows > 0 && reqFirstRow < totalRows) {
-                               schedule(250);
+                               schedule(msec);
 
                                // tell scroll position to user if currently "visible" rows are
                                // not rendered