Thursday, July 21, 2016

Re: How to detect the scrollpanel is still scrolling or not in GWT?

I don't know if that helps with your problem, but you could leave the events as they are today and only make new requests to the server when the previous one were executed.

Something like this:

private boolean requestingServer = false;

public void onScroll(ScrollEvent scrollEvent) {
if (requestingServer) return;
    requestingServer = true;
    doServerRequest(new Callback(){ //pseudo code here for a callback mechanism
        public void onResponse(Payload something){
requestingServer = false;

You can add a logic for a minimum delay between requests as well.

This kind of code works on GWT because it is single threaded. In pure Java you would need to create synchronized blocks to ensure that only one request is being made to the server.

You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To post to this group, send email to
Visit this group at
For more options, visit

No comments:

Post a Comment