|
Re: How does RAP process UI actions? [message #756724 is a reply to message #756696] |
Mon, 14 November 2011 20:04 |
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.03843 seconds