Catalin Gerea Messages: 86 Registered: July 2009 Location: Bucharest, Romania
Member
I have view A with a tree viewer and view B with a table viewer.
The tree viewer has 2 levels; on the second levels it list the children(s) on first level. In the same time when a entry of first level is selected in the tree viewer the table viewer from view B is populated with entries. This works correctly so far.
Problem:
When I added support in table viewer for editing support, allowing the user to change the table values I do not see the tree viewer automatically updated.
Question(s):
1. Is there an automated mechanism to signal back to the tree viewer that it needs to be refreshed/updated?
Am 07.11.11 23:06, schrieb Catalin Gerea:
> I have view A with a tree viewer and view B with a table viewer.
> The tree viewer has 2 levels; on the second levels it list the
> children(s) on first level. In the same time when a entry of first level
> is selected in the tree viewer the table viewer from view B is populated
> with entries. This works correctly so far.
>
> Problem:
> When I added support in table viewer for editing support, allowing the
> user to change the table values I do not see the tree viewer
> automatically updated.
>
> Question(s):
> 1. Is there an automated mechanism to signal back to the tree viewer
> that it needs to be refreshed/updated?
See my answer to your other question. You have to call viewer.update(o,null)
The other option is to use Eclipse Databindings Viewer Support.
Catalin Gerea Messages: 86 Registered: July 2009 Location: Bucharest, Romania
Member
Hello Tom
I have 2 viewers in 2 separate views. In my EditingSupport setValue() method I do call viewer.update(o, null);, but this has effect only on the second view (the details view). The first view (the master view) is not refreshed at all.
As far as I saw Eclipse Databindings Viewer Support is effective only when a single view is involved and not two views. Do you have some kind of snippet for this case?
No when using SWT-Databinding and both Views show the same underlying
Object they would be updated both!
Tom
Am 08.11.11 22:01, schrieb Catalin Gerea:
> Hello Tom
>
> I have 2 viewers in 2 separate views. In my EditingSupport setValue()
> method I do call viewer.update(o, null);, but this has effect only on
> the second view (the details view). The first view (the master view) is
> not refreshed at all.
>
> As far as I saw Eclipse Databindings Viewer Support is effective only
> when a single view is involved and not two views. Do you have some kind
> of snippet for this case?