Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » How does RAP process UI actions?
How does RAP process UI actions? [message #756696] Mon, 14 November 2011 17:21 Go to next message
Stefan Be. is currently offline Stefan Be.Friend
Messages: 2
Registered: November 2011
Junior Member
Hello RAP team,

just a general question regarding RAP's UI event processing.

When you click on multiple UI elements (e.g. buttons) within a short time, are those clicks processed in a queue, one by one, each one waiting for the previous one to be finished (somehow "synchronized")?

You know, in some cases our application code takes some time to generate a response (e.g. when filtering a list or searching for something in a huge amount of data). During waiting for the UI to respond the user may click again and again or he may want to perform a different action. So we're just curious if the pending requests would get aborted (normal web page behaviour) or not.

It might be even interesting if there is a possibility to disable such a synchronization and abort pending requests in order to make the UI more "responsive".

- Stefan
Re: How does RAP process UI actions? [message #756724 is a reply to message #756696] Mon, 14 November 2011 20:04 Go to previous message
Cole Markham is currently offline Cole MarkhamFriend
Messages: 150
Registered: July 2009
Location: College Station, TX
Senior Member

Stefan,

As in SWT, all Events are processed in a single UI Thread. In the case of RAP, there is one thread per session. Thus, events are inherently "synchronized". In order to keep the UI responsive, the event handlers in your application code should not be time consuming. If you need to perform a long running operation like you mention, you should use a background thread.

If you are using the Workbench, then the Eclipse Jobs API provides a good framework for this [1][2]. It can provide feedback on progress and allow the user to cancel a previous task.

If you are using just RWT, you will want to create your own background thread for handling the long-running tasks [3].

In either case, your application would handle canceling previous requests based on additional user input.

- Cole

[1] http://www.vogella.de/articles/EclipseJobs/article.html
[2] http://wiki.eclipse.org/RAP/FAQ#How_to_update_the_UI_from_a_background_thread_using_Jobs.3F
[3] http://wiki.eclipse.org/RAP/FAQ#How_to_update_the_UI_from_a_background_thread
Previous Topic:How does RAP process UI actions?
Next Topic:SWT Table
Goto Forum:
  


Current Time: Fri Apr 26 07:01:30 GMT 2024

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

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

Back to the top