super.onLoadFailure(loadConfig, t);
}
};
((Workbench)Registry.get(Workbench.ID)).showWaitCursor(constants.loadingStructure());
viewsTree = createTree(user, treeLoader);
LoadListener initialOpenListener = new LoadListener() {
public void loaderLoadException(LoadEvent le) {
((Workbench)Registry.get(Workbench.ID)).hideWaitCursor();
}
public void loaderLoad(LoadEvent le) {
if (le.config != null && le.config instanceof TreeNode
&& ((TreeNode) le.config).getParent() == null) { // Root
// node
if (le.data != null && le.data instanceof List) {
List loaded = (List) le.data;
if (!loaded.isEmpty()) {
Object o = loaded.get(0);
if (o instanceof TreeNode) {
TreeNode tn = (TreeNode) o;
Component c = treeBinder.findItem(tn);
if (c != null && c instanceof TreeItem) {
if (!((TreeItem) c).isExpanded()) {
((TreeItem) c).setExpanded(true);
treeLoader.removeLoadListener(this);
}
}
}
}
}
}
((Workbench)Registry.get(Workbench.ID)).hideWaitCursor();
}
};
treeLoader.addLoadListener(initialOpenListener);
treeLoader.addLoadListener(new LoadListener(){
public void loaderBeforeLoad(LoadEvent le) {
((Workbench)Registry.get(Workbench.ID)).showWaitCursor(constants.loadingChildren());
}
public void loaderLoadException(LoadEvent le) {