bugs fixed on result size equal to 0

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/databases-manager-portlet@98536 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Loredana Liccardo 2014-07-09 16:34:40 +00:00
parent 90827d8d87
commit 42713e33d5
2 changed files with 24 additions and 2 deletions

View File

@ -1319,6 +1319,8 @@ public class GxtBorderLayoutPanel extends ContentPanel {
// LinkedHashMap<String, FileModel> data = element.getDBInfo();
List<Result> dataDB = element.getDBInfo();
if (dataDB!=null){
// System.out.println("GxtBorderLayout->size info: " + dataDB.size());
@ -1347,6 +1349,8 @@ public class GxtBorderLayoutPanel extends ContentPanel {
centerUpper.add(grid);
centerUpper.layout(true);
}
}

View File

@ -349,10 +349,18 @@ public class GxtTreePanel extends LayoutContainer {
}
// int numChildrenFolder = store.getChildCount(element);
addChildren(element, result);
element.setIsLoaded(true);
if (result.size()==0){
element.setIsExpanded(false);
treePanel.setExpanded(element, false);
}
if (tree.isMasked())
tree.unmask();
@ -554,6 +562,11 @@ public class GxtTreePanel extends LayoutContainer {
// // fire event
// eventBus.fireEvent(new DisplayDBInfoEvent());
if (result.size()==0){
element.setIsExpanded(false);
treePanel.setExpanded(element, false);
}
if (treePanel.isMasked())
treePanel.unmask();
@ -629,6 +642,9 @@ public class GxtTreePanel extends LayoutContainer {
// loadTables(element);
rootLogger.log(Level.INFO, "the database has not schema");
element.setIsExpanded(false);
treePanel.setExpanded(element, false);
} else {
@ -649,10 +665,12 @@ public class GxtTreePanel extends LayoutContainer {
addChildren(element, result);
element.setIsLoaded(true);
// element.setIsLoaded(true);
// }
}
element.setIsLoaded(true);
if (treePanel.isMasked())
treePanel.unmask();