}
});
}
public void selectPath(ViewPath viewPath) {
Tree theTree = getTree();
if (viewPath.viewsLeft() > 0) {
String key = "";
for (ViewId view : viewPath.getViewPath().subList(2, viewPath.getViewPath().size())) {
if (key.length() > 0) {
key += "_";
} else {
key = String.valueOf(currentlySelectedBundleGroupId) + '_'; // all keys start with the parent group ID
}
key += view.getPath();
TreeNode node = theTree.findById(key);
// special case code to handle a "deployments" path. the path structure does not mirror the
// tree structure, so we may have to manually force the "destinations" folder to open.
if (node == null) {
if (key.endsWith("deployments")) {
String tempKey = key.replace("deployments", "destinations");
node = theTree.findById(tempKey);
}
}
if (node != null) {
// open the node, this will force a fetch of child data if necessary
theTree.openFolder(node);
// special case code to handle a "deployments" path. the path structure does not mirror the
// tree structure, so we may have to manually force the "destinations" folder to open, and
// then its children (deployment nodes)
if (key.endsWith("deployments")) {
theTree.openFolders(theTree.getChildren(node));
}
} else {
// wait for data to get loaded...
pendingPath = new ViewPath(viewPath.toString());
return;