aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatti Tahvonen <matti.tahvonen@itmill.com>2007-10-10 11:16:27 +0000
committerMatti Tahvonen <matti.tahvonen@itmill.com>2007-10-10 11:16:27 +0000
commit007fc7e24385169eea52cb308c1cda24f0baa6fd (patch)
tree9bf296c20a9bfb1fc332680691865f4ffa915e54
parent8719ca4babd57ca16e584aa30b61f6157ad6dc70 (diff)
downloadvaadin-framework-007fc7e24385169eea52cb308c1cda24f0baa6fd.tar.gz
vaadin-framework-007fc7e24385169eea52cb308c1cda24f0baa6fd.zip
avoiding timing issues with hosted mode
svn changeset:2483/svn branch:trunk
-rw-r--r--src/com/itmill/toolkit/terminal/gwt/client/ui/IScrollTable.java10
1 files changed, 8 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 3d631ead51..5abbe6c095 100644
--- a/src/com/itmill/toolkit/terminal/gwt/client/ui/IScrollTable.java
+++ b/src/com/itmill/toolkit/terminal/gwt/client/ui/IScrollTable.java
@@ -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