|
(no subject) [message #692568 is a reply to message #691570] |
Mon, 04 July 2011 14:40  |
Eclipse User |
|
|
|
Hi AmFreak,
1. You have to build some kind of listener model that notifies the main-view
of changes in the model
2. The trigger or event should contain the parent project of the person that
was just modified. You should then use this to lookup the item in the tree
that needs changing and call the treeviewers refresh method. This will call
your content provider again for a fresh list of children.
Regards,
Wim
> Hi,
>
> i have a Main-View with a treeViewer that shows projects and persons as
branches in those projects. The model of the treeViewer is the table
"projects" of a database. The table has a many to many relationship to the
another table called "persons". I have a command that opens a second view
"Manage Persons" (model of that view is the table persons) which shows a
table with all "persons" in it. In this view i can add, delete or change
persons. If i now for example change a person and save the changes to the
model the table is updated (cause of Data binding). But how can i update the
Main-View?
>
> The 2 problems i have are:
> 1. How do i inform the Main-View that the model of the second view was
changed?
> 2. How do i update the Main-View then, the only thing coming to my mind is
reading the projects table again and setting it as the new input of the
treeViewer.
>
> Thanks for any answers :)
|
|
|
Powered by
FUDForum. Page generated in 0.23464 seconds