git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/vre-management/VREModeler@8796 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
178061f061
commit
86dfb0f005
|
@ -217,11 +217,11 @@ public class XMLUtil {
|
|||
});
|
||||
}
|
||||
//logger.debug("MDFProva: Derivable "+keyTemp+" "+temp);
|
||||
if(MDFHash.contains(resNative.getString(1))) MDFHash.get(resNative.getString(1)).second.add(tmpEl);
|
||||
if(MDFHash.contains(resDerivable.getString(1))) MDFHash.get(resDerivable.getString(1)).second.add(tmpEl);
|
||||
else{
|
||||
tempArray=new ArrayList<Element>();
|
||||
tempArray.add(tmpEl);
|
||||
MDFHash.put(resNative.getString(1), new Couple<Element, ArrayList<Element>>(tmpKeyEl, tempArray) );
|
||||
MDFHash.put(resDerivable.getString(1), new Couple<Element, ArrayList<Element>>(tmpKeyEl, tempArray) );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -57,7 +57,6 @@ public class LayoutCreation {
|
|||
try {
|
||||
ResultSet selectedPortlet= DBInterface.queryDB("select p.name, p.portletclass, p.parent from VRERELATEDFUNCT as vf,PORTLETRELTOFUNCT as pf, PORTLET as p WHERE vf.FUNCID=pf.FUNCID and pf.PORTLETNAME=p.NAME and vf.VREID='"+this.vreId+"';");
|
||||
while (selectedPortlet.next()){
|
||||
System.out.println("portlet name:"+selectedPortlet.getString(1)+" portletClass:"+selectedPortlet.getString(2));
|
||||
AbstractTree child= new TreeLeaf(selectedPortlet.getString(1), selectedPortlet.getString(2) );
|
||||
String parent= selectedPortlet.getString(3);
|
||||
System.out.println("parent: "+parent);
|
||||
|
@ -73,7 +72,6 @@ public class LayoutCreation {
|
|||
}catch(Exception e){parent=null;}
|
||||
}
|
||||
layoutTree.addPathNode(child);
|
||||
System.out.println("sono entrato");
|
||||
}
|
||||
} catch (SQLException e) {
|
||||
throw new Exception("Error creating the Portlet Tree",e);
|
||||
|
|
|
@ -33,6 +33,15 @@ public class TreeLeaf extends AbstractTree{
|
|||
row.setAttribute("style", "");
|
||||
row.setAttribute("visible", "true");
|
||||
row.setAttribute("width", "");
|
||||
|
||||
Element column =doc.createElement("column");
|
||||
column.setAttribute("can-modify", "false");
|
||||
column.setAttribute("label", "");
|
||||
column.setAttribute("required-role", "");
|
||||
column.setAttribute("style", "");
|
||||
column.setAttribute("visible", "true");
|
||||
column.setAttribute("width", "");
|
||||
|
||||
Element frame = doc.createElement("frame");
|
||||
frame.setAttribute("can-modify", "false");
|
||||
frame.setAttribute("inner-padding", "");
|
||||
|
@ -46,7 +55,8 @@ public class TreeLeaf extends AbstractTree{
|
|||
Element portlet= doc.createElement("portletClass");
|
||||
portlet.setTextContent(this.getPortletClass());
|
||||
frame.appendChild(portlet);
|
||||
row.appendChild(frame);
|
||||
column.appendChild(frame);
|
||||
row.appendChild(column);
|
||||
return row;
|
||||
}
|
||||
|
||||
|
|
|
@ -35,6 +35,7 @@ public class TreeNode extends AbstractTree{
|
|||
|
||||
@Override
|
||||
public Element createElement(Document doc) {
|
||||
if (this.getNodeName().compareTo("Root")!=0){
|
||||
Element tab= doc.createElement("tab");
|
||||
tab.setAttribute("align", "left");
|
||||
tab.setAttribute("can-modify", "false");
|
||||
|
@ -45,15 +46,16 @@ public class TreeNode extends AbstractTree{
|
|||
tab.setAttribute("style", "");
|
||||
tab.setAttribute("visible", "true");
|
||||
tab.setAttribute("width", "");
|
||||
if (this.getNodeName().compareTo("Root")!=0){
|
||||
|
||||
Element title= doc.createElement("title");
|
||||
title.setAttribute("lang", "en");
|
||||
title.setTextContent(this.getNodeName());
|
||||
tab.appendChild(title);
|
||||
}
|
||||
|
||||
|
||||
Element subRoot;
|
||||
if(this.childs.get(0).isLeaf()){
|
||||
Element subRoot= doc.createElement("table");
|
||||
subRoot= doc.createElement("table");
|
||||
subRoot.setAttribute("can-modify", "false");
|
||||
subRoot.setAttribute("label", "");
|
||||
subRoot.setAttribute("required-role", "");
|
||||
|
@ -65,21 +67,36 @@ public class TreeNode extends AbstractTree{
|
|||
}
|
||||
tab.appendChild(subRoot);
|
||||
}else{
|
||||
subRoot= doc.createElement("tabbed-pane");
|
||||
subRoot.setAttribute("can-modify", "false");
|
||||
subRoot.setAttribute("label", "");
|
||||
subRoot.setAttribute("required-role", "");
|
||||
subRoot.setAttribute("style", "sub-menu");
|
||||
subRoot.setAttribute("visible", "true");
|
||||
subRoot.setAttribute("width", "");
|
||||
|
||||
for (AbstractTree t:this.childs){
|
||||
tab.appendChild(t.createElement(doc));
|
||||
subRoot.appendChild(t.createElement(doc));
|
||||
}
|
||||
tab.appendChild(subRoot);}
|
||||
return tab;
|
||||
}else{
|
||||
Element root;
|
||||
root= doc.createElement("tabbed-pane");
|
||||
root.setAttribute("can-modify", "false");
|
||||
root.setAttribute("label", "");
|
||||
root.setAttribute("required-role", "");
|
||||
root.setAttribute("style", "sub-menu");
|
||||
root.setAttribute("visible", "true");
|
||||
root.setAttribute("width", "");
|
||||
|
||||
for (AbstractTree t:this.childs){
|
||||
root.appendChild(t.createElement(doc));}
|
||||
|
||||
return root;
|
||||
}
|
||||
|
||||
Element tabpane= doc.createElement("tabbed-pane");
|
||||
tabpane.setAttribute("can-modify", "false");
|
||||
tabpane.setAttribute("label", "");
|
||||
tabpane.setAttribute("required-role", "");
|
||||
tabpane.setAttribute("style", "sub-menu");
|
||||
tabpane.setAttribute("visible", "true");
|
||||
tabpane.setAttribute("width", "");
|
||||
tabpane.appendChild(tab);
|
||||
|
||||
return tabpane;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue