Skip to Content
avatar image
Former Member

unknown child node

Hallo,

sometime (not every time), we get the above exception:

com.sap.tc.webdynpro.progmodel.context.ContextException: DataNodeInfo(RoadMapVIew.dyn_phase1.dyn_subphases): unknown child node dyn_subphase3

at com.sap.tc.webdynpro.progmodel.context.Paths.followMetaPath(Phats.java:794)

.

.

.

This is the code:

int phaseSize = processT.getSequenceGroup1().getPhaseList().getSequenceGroup1().getPhase().length;

for (int i = 0; i < phaseSize; i++)
{
PhaseT phaseT = processT.getSequenceGroup1().getPhaseList().getSequenceGroup1().getPhase();

IWDNodeInfo fase = wdContext.getNodeInfo().addChild("dyn_phase" + i, null, true, true, true, false, false, true, null, null, null);
fase.addAttribute("dyn_phaseDesc", "com.sap.dictionary.string");
fase.addAttribute("dyn_phaseId", "com.sap.dictionary.string");

IWDNodeInfo sottoFasi = fase.addChild("dyn_subphases", null, true, true, true, false, false, true, null, null, null);

int subPhaseSize = phaseT.getSequenceGroup1().getSubPhaseList().getSequenceGroup1().getSubPhase().length;
for (int j = 0; j < subPhaseSize; j++)
{
IWDNodeInfo sottoFase = sottoFasi.addChild("dyn_subphase" + j, null, true, true, true, false, false, true, null, null, null);
sottoFase.addAttribute("dyn_subphaseId", "com.sap.dictionary.string");
sottoFase.addAttribute("dyn_subphaseDesc", "com.sap.dictionary.string");
sottoFase.addAttribute("dyn_subphaseStatus", "com.sap.dictionary.string");
}
}
for (int i = 0; i < phaseSize; i++)
{

PhaseT phaseT = processT.getSequenceGroup1().getPhaseList().getSequenceGroup1().getPhase()
;

IWDNode nodoDynFase = wdContext.currentContextElement().node().getChildNode("dyn_phase" + i, IWDNode.LEAD_SELECTION);
IWDNodeElement element = nodoDynFase.getCurrentElement(); //Attribute("labelFase");
element.setAttributeValue("dyn_phaseDesc", phaseT.getSequenceGroup1().getPhaseDesc());
element.setAttributeValue("dyn_phaseId", phaseT.getSequenceGroup1().getPhaseId());

IWDNode nodoDynSubFasi = nodoDynFase.getChildNode("dyn_subphases", IWDNode.LEAD_SELECTION);

int subPhaseSize = phaseT.getSequenceGroup1().getSubPhaseList().getSequenceGroup1().getSubPhase().length;

for (int j = 0; j < subPhaseSize; j++)
{
SubPhaseT subPhaseT = phaseT.getSequenceGroup1().getSubPhaseList().getSequenceGroup1().getSubPhase()[j];

IWDNode nodoDynSubFase = nodoDynSubFasi.getChildNode("dyn_subphase" + j, IWDNode.LEAD_SELECTION);

IWDNodeElement elementDynSubFase = nodoDynSubFase.getCurrentElement();
elementDynSubFase.setAttributeValue("dyn_subphaseId",subPhaseT.getSequenceGroup1().getSubPhaseId());
elementDynSubFase.setAttributeValue("dyn_subphaseDesc", subPhaseT.getSequenceGroup1().getSubPhaseDesc());
elementDynSubFase.setAttributeValue("dyn_subphaseStatus", subPhaseT.getSequenceGroup1().getStatus());
}
}
IWDGroup rootContainer = (IWDGroup) view.getElement("gr_rootGroup");

container = (IWDTransparentContainer) view.createElement(IWDTransparentContainer.class, "ElementContainer1"+(new Date()).getTime());

//contenitore delle tabelle delle fasi
IWDGridLayout layout = (IWDGridLayout) container.createLayout(IWDGridLayout.class);
layout.setColCount(phaseSize);
layout.setCellSpacing(10);
layout.setStretchedHorizontally(false);

String currentStatus = "";
String currentPhaseId = "";
String currentSubphaseId = "";
String currentNotifyId = "";

String lastStatus = "";

for (int i = 0; i < phaseSize; i++)
{
PhaseT phaseT = processT.getSequenceGroup1().getPhaseList().getSequenceGroup1().getPhase();

IWDTransparentContainer blocco = (IWDTransparentContainer) view.createElement(IWDTransparentContainer.class,"blocco"i(new Date()).getTime());

IWDGridLayout blocco_layout = (IWDGridLayout) blocco.createLayout(IWDGridLayout.class);

layout.setColCount(phaseSize);

layout.setCellSpacing(10);

IWDTable tb_phase = (IWDTable) view.createElement(IWDTable.class,"tb_phase"i(new Date()).getTime());

String bindPath = "dyn_phase"+i;

tb_phase.bindDataSource(bindPath);

tb_phase.setFooterVisible(false);

tb_phase.setRowSelectable(false);

tb_phase.setSelectionMode(WDTableSelectionMode.NONE);

tb_phase.setScrollableColCount(0);

tb_phase.setVisibleRowCount(1);

tb_phase.setWidth("100%");

IWDTableColumn col_phase = (IWDTableColumn) view.createElement(IWDTableColumn.class,"col_phase"i(new Date()).getTime());

IWDTextView tw_phase = (IWDTextView) view.createElement(IWDTextView.class,"tw_phase"+i);

tw_phase.bindText(bindPath+".dyn_phaseDesc");

col_phase.setTableCellEditor(tw_phase);

tb_phase.addColumn(col_phase);

blocco.addChild(tb_phase);

IWDTable tb_subPhase = (IWDTable) view.createElement(IWDTable.class,"tb_subPhase"i(new Date()).getTime());

tb_subPhase.setFooterVisible(false);

tb_subPhase.setRowSelectable(false);

tb_subPhase.setSelectionMode(WDTableSelectionMode.NONE);

tb_subPhase.setVisibleRowCount(1); //verificare con Alberto

tb_subPhase.bindDataSource( bindPath+".dyn_subphases");

int subPhaseSize = phaseT.getSequenceGroup1().getSubPhaseList().getSequenceGroup1().getSubPhase().length;

for(int j = 0; j< subPhaseSize; j++)

{

SubPhaseT subPhaseT = phaseT.getSequenceGroup1().getSubPhaseList().getSequenceGroup1().getSubPhase()[j];

String status = subPhaseT.getSequenceGroup1().getStatus();

IWDTableColumn col_subPhase = (IWDTableColumn) view.createElement(IWDTableColumn.class,"col_subPhase"i"_"+j);

IWDTextView tw_subPhase = (IWDTextView) view.createElement(IWDTextView.class,"tw_subPhase"i"_"+j);

tw_subPhase.bindText( bindPath+".dyn_subphases.dyn_subphase" + j + ".dyn_subphaseDesc");

tw_subPhase.setTooltip(status);

col_subPhase.setTableCellEditor(tw_subPhase);

lastStatus = status;

//le fasi/sotofasi sono ordinate perciò la corrente è l'ultima con uno status valido

if (status != null && !status.equals(""))

{

currentStatus = status;

currentPhaseId = phaseT.getSequenceGroup1().getPhaseId();

currentSubphaseId = subPhaseT.getSequenceGroup1().getSubPhaseId();

if (status.equals(DAConst.STATUS_NOTIFY))

{

//currentNotifyId = "notifyId"; //subPhaseT.getSequenceGroup1().getNotifyId();

currentNotifyId = subPhaseT.getSequenceGroup1().getNotifyId();

}

}

if(status.equals(DAConst.STATUS_RUNNING)){

col_subPhase.setCellDesign(wdContext.currentColoreCelleElement().getRUNNING());

}else if(status.equals(DAConst.STATUS_NOTIFY)){

col_subPhase.setCellDesign(wdContext.currentColoreCelleElement().getNOTIFY());

}else if(status.equals(DAConst.STATUS_COMPLETED)){

col_subPhase.setCellDesign(wdContext.currentColoreCelleElement().getCOMPLETED());

}else if(status.equals(DAConst.STATUS_ABORTED)){

col_subPhase.setCellDesign(wdContext.currentColoreCelleElement().getABORTED());

}else{

//col_subPhase.setCellDesign(wdContext.currentColoreCelleElement().getOTHER());

}

tb_subPhase.addColumn(col_subPhase);

}

blocco.addChild(tb_subPhase);

container.addChild(blocco);

}

rootContainer.addChild(container)

Please could anybody help us?

Thanks,

regards,

Andrea

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • Mar 12, 2009 at 04:35 AM

    Hi

    Explain this line what u want to achieve here by lead selection.

    IWDNode nodoDynSubFasi = nodoDynFase.getChildNode("dyn_subphases", IWDNode.LEAD_SELECTION);

    Best Regards

    Satish Kumar

    Add comment
    10|10000 characters needed characters exceeded