Is there any way to implement scroll bar with mouse listeners? Bottom line, 
I want to send the request while doing scrolling. I meant last scrolling 
height to server if scrolling is delayed for 100 ms or stopped.


On Friday, 22 July 2016 12:12:57 UTC+5:30, DavidN wrote:
>
> maybe you could listen to mousedown/up in combination with scrollevents ?
> On Fri, 22 Jul 2016 at 08:27, shiva raaj <[email protected] <javascript:>> 
> wrote:
>
>> Thanks for response. But I need consider last request only. Basically I 
>> need to skip(eaten) all the previous request. I have logic to eat the 
>> request.But Is there any way to find out scroll bar is still scrolling 
>> without release the bar.
>>
>> Thank U
>>
>>
>> On Thursday, 21 July 2016 18:18:25 UTC+5:30, Gilberto wrote:
>>>
>>> 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 [email protected] <javascript:>.
>> To post to this group, send email to [email protected] 
>> <javascript:>.
>> Visit this group at https://groups.google.com/group/google-web-toolkit.
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

Reply via email to