Skip to Content
0
Former Member
Mar 15, 2007 at 05:00 PM

WDCopyService.copyElements(sourceNode, targetNode, true)

51 Views

Hi All,

I am trying to copy 2 model nodes using the

WDCopyService.copyElements(sourceNode, targetNode, true);

The targetNode is created in the following way:

IWDNodeInfo targetInfo = wdContext.nodeRoot().getNodeInfo().addChild("Target", ICMIGenericModelClass.class, true, CMICardinality.MANY, CMICardinality.ZERO_TO_ONE, true, null);

IWDNode targetNode = wdContext.nodeRoot().getChildNode("Target" , wdContext.nodeRoot().getLeadSelection());

But, the WDCopyService.copyElements(sourceNode, targetNode, true); results in the following error:

NodeInfo(path=Root.Floorplan.OG.QL/MainView.Inports.Root.Target, class=com.sap.tc.webdynpro.progmodel.context.DataNodeInfo): model node cannot be created without an instance of com.sap.tc.cmi.model.ICMIGenericModelClass

Can somebody pls help me with this error?

Regards,

Vinay