on 10-24-2011 12:20 PM
hi,
Kindly provide simple code of transfering data from one context node1(0...n) to other context node2 (0...n)
node1 has data at the start of the view and node2 is empty so it needs to be populate with same data as node1 in wdinit method of the view
thanks in advance
b
thrz no help for WDJ like there is google for java. had to myself hunt out the sample code. however, thank u for the answers
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Is it so hard to figure this out yourself? Anyway, it cannot be simpler than this:
WDCopyService.copyElements(node1, node2);
See also API http://help.sap.com/javadocs/NW04S/SPS09/wd/com/sap/tc/webdynpro/progmodel/api/WDCopyService.html
Best regards,
Robin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If both node's structures are not equal, you need to code the following:
Iterate through the elements of node1
within the loop, create and add a new element for node2
set the node2 attributes with the appropriate node1 values
Have a look at the IWDNode and IWDNodeElement API's for more info on the iterateElements(), createAndAdd<yourNode>Element() and get/set attributevalue methods.
Robin
User | Count |
---|---|
94 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.