Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 379756

Summary: Navigator doesn't refresh after running a command
Product: [ECD] Orion Reporter: Mark Macdonald <mamacdon>
Component: ClientAssignee: libing wang <libingw>
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: P3 CC: susan
Version: 0.5   
Target Milestone: 0.5 M2   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Mark Macdonald CLA 2012-05-16 16:27:35 EDT
Using HEAD as of right now

1. Navigate into some folder.
2. Use the "New File/Folder" command to create a new item.
3. The list of items does not refresh. Reloading the page shows the new item.

The same thing happens when I delete or rename an item.
Comment 1 Susan McCourt CLA 2012-05-16 17:07:40 EDT
I traced this to line 239 of explorer-table.

this.fileClient.fetchChildren(parent.ChildrenLocation).then(function(children) {
mUtil.processNavigatorParent(parent, children);
//If a key board navigator is hooked up, we need to sync up the model
if(that.getNavHandler()){
>>>>>>>>>>that._initSelModel();
}
dojo.hitch(that.myTree, that.myTree.refresh)(parent, children, forceExpand);
}); 

_initSelModel is not defined, so it blows out of the update.
Libing, it wasn't obvious to me what to do here....
Comment 2 Mark Macdonald CLA 2012-05-16 17:10:54 EDT
Worth mentioning: the bug only happens when you've drilled into a subfolder. If you're at the top level of your Orion folders, the toolbar commands work fine.
Comment 3 Mark Macdonald CLA 2012-05-16 17:13:28 EDT
(In reply to comment #2)
> Worth mentioning: the bug only happens when you've drilled into a subfolder. If
> you're at the top level of your Orion folders, the toolbar commands work fine.

Oops, this is not quite right. Commands inside the "New" menu (which only appears at the top level) refresh the view correctly.

Commands inside the "More" menu, and the "New File/Folder" toolbar buttons, do not.
Comment 4 libing wang CLA 2012-05-16 19:07:21 EDT
I commented out that._initSelModel(); for now. You can  see the items right away.
But the selection model is not synced up so for now you still have to reload the page.
That was a hole when I refactored the navHandler APIs.
The current selection model is created on the base class level inside .createTree function. We need another API in the explorer to surface the .myTree.refresh function so that when the tree is refreshed we can sync up the selection model.

I will fix this tomorrow.
Comment 5 libing wang CLA 2012-05-17 15:03:41 EDT
Noticed that drilling  in and out of folders does not sync the selection model dictionary as well. Will fix them together with this bug.