Hi everybody,
i want to copy the values from one node + childnode to an other node + childnode:
Copy:
-Warenkorb (node)
-
auswahlRaeume (node)
To:
-Warenkorb_1 (node)
-
auswahlRaeume_1 (node)
I try it with the following piece of code, it works but the leadSelections are all the same. What could be the problem?
WDCopyService.copyElements(wdContext.nodeWarenkorb(),wdContext.nodeWarenkorb_1()); for ( int i = 0; i < wdContext.nodeWarenkorb().size(); i++ ){ for ( int j = 0; j < wdContext.nodeWarenkorb().getWarenkorbElementAt(i).nodeAuswahlRaeume().size(); j++ ){ IAuswahlRaeume_1Element elem_raeume = wdContext.createAuswahlRaeume_1Element(); elem_raeume.setBezeichnung( wdContext.nodeWarenkorb().getWarenkorbElementAt(i). nodeAuswahlRaeume().getAuswahlRaeumeElementAt(j).getBezeichnung()); elem_raeume.setRaumtyp( wdContext.nodeWarenkorb().getWarenkorbElementAt(i). nodeAuswahlRaeume().getAuswahlRaeumeElementAt(j).getRaumtyp()); wdContext.nodeWarenkorb_1().getWarenkorb_1ElementAt(i).nodeAuswahlRaeume_1().addElement(elem_raeume); } wdContext.nodeAuswahlRaeume_1().getAuswahlRaeume_1ElementAt(i).node().setLeadSelection( wdContext.nodeWarenkorb().getWarenkorbElementAt(i).nodeAuswahlRaeume().getLeadSelection() ); }
regards,
sid