PDA

View Full Version : Calls to TreeViewer refresh only work the first time


cdasher
04-24-2008, 04:48 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.getSelectionModel());
viewer.update(tree.getSelectionModel());
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.

cdasher
04-24-2008, 04:51 PM
Infact if I refresh the application the new items show up in the tree, but any new items do not.