Viewer with editing support and properties view [message #755272] |
Mon, 07 November 2011 21:42 |
|
I have created a tree viewer with a tabbed properties view and a table viewer with a simple (original) properties view. Both viewers are have editing support implemented.
Problem:
When the value(s) from the tree viewer or table viewer changes due to editing, the properties view is not updated. It is updated only when the selection changes in the tree/table viewer.
Question(s):
1. Since the properties view reacts to selection changes I have tried to add a selection event to the setValue() method of my class extending EditingSupport. I am able to create a new StructuredSelection(changed_viewer_element), but I do not know how to fire this as an event.
2. Is there an automatic mechanism that covers this scenario?
Time is what you make of it.
|
|
|
|
Re: Viewer with editing support and properties view [message #755578 is a reply to message #755396] |
Tue, 08 November 2011 20:43 |
|
Hello Tom
I do invoke viewer.update(o, null) in my EditingSupport#setValue(). And the table/tree viewer gets updated accordingly.
The problem is that the properties view (either this or this) does not get updated.
What do you mean by "after having updated the domain-attribute"?
My EditingSupport code looks like this:
@Override
protected void setValue(Object element, Object value) {
if (element instanceof UserGroup) {
((UserGroup) element).setGroupName(String.valueOf(value));
}
viewer.update(element, null);
}
and the code for setting the group name is:
public void setGroupName(String groupName) {
propertyChangeSupport.firePropertyChange("groupName", this.groupName,
this.groupName = groupName);
}
Am I missing something?
Time is what you make of it.
|
|
|
Powered by
FUDForum. Page generated in 0.03971 seconds