on 08-20-2010 7:48 AM
Hi
can any body assist me with a sample code to copy the elements from one node into another using copy service
rgds
Akeel
Hi,
WDCopyService.copyElements(wdContext().node<SourceNode>(), wdContext().node<TargetNode>());
WDCopyService.copyCorresponding(wdContext().node<SourceNode>().get<NodeName>ElementAt(i), wdContext().node<TargetNode>().get<NodeName>ElementAt(i));
But for these 2 API's to run, the name and type of the attributes should be identical. i.e
-Source: -Target:
--Name (String) --Name (String)
--Number (integer) --Number (integer)
Else it will not throw an error, but will not copy the values. Only matching fields will be copied.
copycorresponding can be used in a for loop to copy selected values
Regards,
Poojith MV
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Can anyone suggest me, if i can achieve copying data from one recursive node to another for bringing in a buffer layer?
both the structures, along with the name are exactly same!
any light? I had tried copy services and itsnot working in the case of recursive nodes
Regards
Senon
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You can use the following code:
WDCopyService.copyElements(srcElement, targetElement);
However you can also copy the entire node with:
WDCopyService.copySubtree(srcNode, targetNode);
Regards,
Manoj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.