Update View Dynamically? [message #948826] |
Thu, 18 October 2012 08:18  |
Eclipse User |
|
|
|
Hi Folks,
I'm currently using a CheckboxTableViewer with an IObserverable List that populates the table with items.
The issue I am having is that once a new item is successfully added to the IObservableList the display of the table does not get updated UNLESS I click on the display somewhere (on the scroll bar, anywhere on the display in the web browser, etc.).
I was wondering if it was possible to update the display without having to constantly click something.
Any help would be great.
|
|
|
Re: Update View Dynamically? [message #948940 is a reply to message #948826] |
Thu, 18 October 2012 10:34  |
Eclipse User |
|
|
|
Peter,
What you are looking for is the UICallback. See the FAQ entry here[1]. Keep in mind that the UICallback must be activated from the display thread. Also remember that you can/will have multiple clients connected, each with their own display and their own databinding realm. I think you would need each viewer to have its own IObservableList and only update that list from its display thread using asyncExec(). If there is a shared data model, then you would need to have each client register a listener which holds a reference to its Display that it can use to call asyncExec() which notified of a change to the model. Then, of course, be sure to cleanup all of the listeners when the display/viewer is disposed.
[1] http://wiki.eclipse.org/RAP/FAQ#How_to_update_the_UI_from_a_background_thread
Hope that helps,
Cole
|
|
|
Powered by
FUDForum. Page generated in 0.03261 seconds