TreeViewer:can't update children TreeItems [message #530710] |
Fri, 30 April 2010 15:15 |
pororo1985 Messages: 1 Registered: April 2010 |
Junior Member |
|
|
i have a treeviewer ,and also set a ICellModifier for it。
in the ICellModifier:
public void modify(Object element, String property, Object value) {
//modify and update element
........
if(element instanceof TreeItem){
TreeItem item = (TreeItem) element;
if(property.equals("key1")){
if(!item.getData().getChildren().isEmpty()){
for(...){
item.getData().getChildren().get(i).setValue(value);
}
treeViewer.update(element , null);
}
}
}
}
now when i modifyed the TreeItem , it's data and it has be modify and updated,but it's Children has not be modify , and Children 's data has be modify,In other words,the TreeItem 's Children not change in the viewer,but data changed.
and if i select the a TreeItem 's child now, it will change to the value what it should be.
so ,who can tell me ,why it happend like this?i have update the element,so the treeViewer should also update it's Children ,isn't it ? and how to repair it?
it's very very very to thank u.
|
|
|
Powered by
FUDForum. Page generated in 0.02816 seconds