src/com/netscape/admin/dirserv/DSContentPage.java | 8 ++++++++ 1 file changed, 8 insertions(+)
New commits: commit 7f1b10fae2e7ce97f71a598b32de357d800e1830 Author: Nathan Kinder nkinder@redhat.com Date: Fri Jun 10 14:39:51 2011 -0700
Bug 705753 - Refresh problem in Console directory browser
If focus is transferred from a leaf entry to a non-leaf entry in the directory brower, the list of child entries will not be displayed in the right-hand panel.
The problem is that the method that gets the details of the selected node keys off of the last component to receive focus. When the event is fired off to tell is that an item in the tree was selected, the focus event has not fired off yet, so we get info about the old leaf entry that was previously selected. We build the children to display off of this entry, but there are none since it is a leaf. The fix simply sets the last focused component to be the tree in the tree listener method. This should be safe since we know that the tree was just selected since we received a TreeSelectionEvent.
diff --git a/src/com/netscape/admin/dirserv/DSContentPage.java b/src/com/netscape/admin/dirserv/DSContentPage.java index d00fb55..dc14070 100644 --- a/src/com/netscape/admin/dirserv/DSContentPage.java +++ b/src/com/netscape/admin/dirserv/DSContentPage.java @@ -668,6 +668,14 @@ implements IPage, public void valueChanged(TreeSelectionEvent e) { if (_isInitialized) { _framework.setBusyCursor(true); + // Manually set the tree as the last focused item since we know it was just + // clicked. We need to do this since getSelectedNodeInfo() will return info + // about the selected node from either the tree or the list depending on which + // is set as the _lastFocusComponent. If the list is set here instead of the + // tree, we will fail to fill in the child entries in the main content pane. + // We have to do this since the focusEvent is fired off after the + // TreeSelectionEvent. + _lastFocusComponent = (Component)_tree; IBrowserNodeInfo node = getSelectedNodeInfo(); if (node == null) { _menuController.disableMenus();
389-commits@lists.fedoraproject.org