Commit 51748cef authored by Claes Sjofors's avatar Claes Sjofors

WebGraph object searched for also in one herarchiy level below WebHandler

parent e24aa4a6
......@@ -196,20 +196,19 @@ public class JopOpWindow extends JPanel {
switch( retCid.classId) {
case Pwrb.cClass_WebGraph:
sret = en.gdh.objidToName( oret.objid, Cdh.mName_volumeStrict);
if ( sret.evenSts()) return;
s = sret.str + ".Name";
sretName = en.gdh.getObjectInfoString( s);
s = sret.str + ".Text";
sretText = en.gdh.getObjectInfoString( s);
button = new OpWindButton( session, sretName.str, sretText.str,
OpWindButton.WEBGRAPH);
this.add( button);
addWebGraphButton( oret.objid);
break;
case Pwrs.cClass_PlantHier:
case Pwrs.cClass_NodeHier:
for ( CdhrObjid oret2 = en.gdh.getChild(oret.objid);
oret2.oddSts();
oret2 = en.gdh.getNextSibling(oret2.objid)) {
CdhrClassId cret2 = en.gdh.getObjectClass(oret2.objid);
if (cret2.oddSts() && cret2.getClassId() == Pwrb.cClass_WebGraph)
addWebGraphButton(oret2.objid);
}
break;
default: ;
}
oret = en.gdh.getNextSibling( oret.objid);
}
......@@ -250,6 +249,22 @@ public class JopOpWindow extends JPanel {
}
}
void addWebGraphButton( PwrtObjid oid) {
CdhrString sret = en.gdh.objidToName( oid, Cdh.mName_volumeStrict);
if ( sret.evenSts()) return;
String s = sret.str + ".Name";
CdhrString sretName = en.gdh.getObjectInfoString( s);
s = sret.str + ".Text";
CdhrString sretText = en.gdh.getObjectInfoString( s);
OpWindButton button = new OpWindButton( session, sretName.str, sretText.str,
OpWindButton.WEBGRAPH);
this.add( button);
}
class OpWindButton extends JButton {
public static final int WEBGRAPH = 1;
public static final int WEBLINK = 2;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment