cdasher
24 Apr 2008, 1:23 PM
I have an asynch Tree using TreeViewer and TreeContentProvider. I load the tree from the database and then add items via a form. When the call returns from the add item, I call
viewer.refresh(tree.getSelectedItem().getParent());
viewer.update(tree.getSelectedItem());
if (!tree.getSelectedItem().isExpanded()){
tree.getSelectedItem().setExpanded(true);
}
The FIRST time the new item is added to the tree and the parent is expanded works great. Subsequent calls and the tree never updates.
also happens if I call just the selectedItem and selectedItem.getElement
If I refresh the browser, I see the new items in the tree but cannot add a new one.
viewer.refresh(tree.getSelectedItem().getParent());
viewer.update(tree.getSelectedItem());
if (!tree.getSelectedItem().isExpanded()){
tree.getSelectedItem().setExpanded(true);
}
The FIRST time the new item is added to the tree and the parent is expanded works great. Subsequent calls and the tree never updates.
also happens if I call just the selectedItem and selectedItem.getElement
If I refresh the browser, I see the new items in the tree but cannot add a new one.