Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Block Mouse/Key Events during server request(Block Mouse/Key Events during server request)
Block Mouse/Key Events during server request [message #831042] Wed, 28 March 2012 11:39 Go to next message
Avrajit Chatterjee is currently offline Avrajit ChatterjeeFriend
Messages: 68
Registered: September 2011
Member
Hi ,

I know that
1. RAP uses a RequestQueue to send requests to server
2. Also RAP shows a Progress cursor after 500ms of the request made

My query -
At times when the server is slow and a request is being processed, the user can do multiple mouse,key activities.Most of them gets queued up and the server request is made one by one which makes the UI updates to come in a sequential manner and makes our application look ugly. We cant make our server faster , neither we can push these requests in BG/Eclipse Job threads. So we want to prevent the user from doing any operation when a request is being processed. Or even if the user is doing mouse clicks we don't want them to be processed. Can we achieve this? We are using 1.5M4.
Re: Block Mouse/Key Events during server request [message #831745 is a reply to message #831042] Thu, 29 March 2012 09:27 Go to previous messageGo to next message
Tim Buschtoens is currently offline Tim BuschtoensFriend
Messages: 396
Registered: July 2009
Senior Member
Hi.

Actually, a bug[1] in the current implementation prevents the client
form having more than 1 mouse or selection event queued (in addition to
the running one). Therefore i'm not sure how the effect you describe
could happen. Worst case scenario, you click two times during a running
request, only one click will get send to the server after the request is
finished. Perhaps you should put more research into what exactly
happens, or perhaps i'm understanding it wrong.

In any case, such problems should be solved in RAP 2.0 (this or next
year) with the implementation of the client-to-server protocol. If you
can't wait that long, it gets tricky.

What you want is basically to freeze the entire application during a
request. I can't recommand that (it'll might feel broken), but if you
really want to try it, the easiest way would be to hack the client to
always use synchrounous requests. I can only give you some pointers, you
will have to figure out the details yourself:

In the bundle org.eclipse.rap.rwt, there is a file
js/org/eclipse/swt/Request.js. The method "_sendImmediate" is used for
most requests.
If you overwrite the argument async with false in the first line, it
*might* do what you want. This is very, very hacky, i can't guarantee it
will work, or if you will break anything with that trick.

Also, you need to recompile the client.js[2]. Alternatively, if you have
enough js-know-how, you could try to register some new javascript or use
the javascript-executer to hack the client. Thats even more complicated,
but you wouldn't have to touch the bundle.

Hope that helps.

Greetings,
Tim

[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=327887
[2] https://github.com/ralfstx/rap-clientbuilder

Am 28.03.2012 13:39, schrieb Avrajit Chatterjee:
> Hi ,
>
> I know that
> 1. RAP uses a RequestQueue to send requests to server
> 2. Also RAP shows a Progress cursor after 500ms of the request made
> My query -
> At times when the server is slow and a request is being processed, the
> user can do multiple mouse,key activities.Most of them gets queued up
> and the server request is made one by one which makes the UI updates to
> come in a sequential manner and makes our application look ugly. We cant
> make our server faster , neither we can push these requests in
> BG/Eclipse Job threads. So we want to prevent the user from doing any
> operation when a request is being processed. Or even if the user is
> doing mouse clicks we don't want them to be processed. Can we achieve
> this? We are using 1.5M4.

--
Tim Buschtöns

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: Block Mouse/Key Events during server request [message #831790 is a reply to message #831745] Thu, 29 March 2012 11:00 Go to previous messageGo to next message
Avrajit Chatterjee is currently offline Avrajit ChatterjeeFriend
Messages: 68
Registered: September 2011
Member
Hi Tim,

Some how its evident in our application. I actually had a look at Request.js earlier and came to the conclusion to hack it. But will need to what does it break. Thanks anyways. Do you have a road map or change list that you guys are planning for RAP 2.0 ? That will be quite interesting to read.
Re: Block Mouse/Key Events during server request [message #831865 is a reply to message #831790] Thu, 29 March 2012 13:02 Go to previous messageGo to next message
Tim Buschtoens is currently offline Tim BuschtoensFriend
Messages: 396
Registered: July 2009
Senior Member
Hi

> But will need to what does it break.

I don't understand that sentence.

> Do you have a road map or change list that you guys are planning for RAP 2.0

Official plan will not be released before 1.5 is done. The only thing
that is certain is the client-to-server protocol. Other than that we
hope to make it release that focuses on stability and useablity.

Greetings,
Tim

--
Tim Buschtöns

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: Block Mouse/Key Events during server request [message #835593 is a reply to message #831865] Tue, 03 April 2012 12:45 Go to previous message
Avrajit Chatterjee is currently offline Avrajit ChatterjeeFriend
Messages: 68
Registered: September 2011
Member
> But will need to what does it break.
A typo error what I mean is "We need to test/check what does it break?"
Previous Topic:Global Save Command Always Disabled
Next Topic:Displayed standard trim toolbar in custom Presentation Factory
Goto Forum:
  


Current Time: Mon Sep 23 08:28:17 GMT 2024

Powered by FUDForum. Page generated in 0.03907 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top