on 10-20-2009 5:39 PM
Hi everybody,
how can i copy a node with a subnode to another node with also a subnode:
Copy:
-- NodeA
-
NodeA1
-
attr1
To:
-NodeB
-
NodeB1
-
attr1
regards,
Sid
Edited by: Sid on Oct 20, 2009 6:47 PM
I use the copyCorresponding method of the WDCopyService class
[http://help.sap.com/javadocs/NW04S/current/wd/com/sap/tc/webdynpro/progmodel/api/WDCopyService.html|http://help.sap.com/javadocs/NW04S/current/wd/com/sap/tc/webdynpro/progmodel/api/WDCopyService.html]
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
First, make sure the data classes of the elements you are trying to copy are identical in source and target node. In fact, the nodes themselves should be identical.
Next, make sure the objects you are trying to copy from/to are elements, not nodes. I could never make the methods copyElements and copySubtree work properly for me, but copyCorresponding works fine. Note that the method detail of the class states that object types other than IWDNodeElement or ICMIGenericModelClass are ignored, and will not necessarily identify the error.
If this doesn't work and you do get an error, please post it.
User | Count |
---|---|
83 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.