on 09-26-2007 3:08 PM
Hi,
I have a web dynpro with 2 equal contexts. First context (node1) contains data (4 different entries) and the second (node2) is empty (0 entries).
I want copy it to second context. I have used the following code:
IWDNode srcNode = (IWDNode)wdContext.node1();
IWDNode destNode = (IWDNode)wdContext.node2();
WDCopyService.copySubtree(srcNode,destNode);
Now destNode has the same data that srcNode (4 different entries). I have verified it.
In my layout I have a table witch dataSource is node2.
When I execute my web dynpro, the table has <b>4 EQUAL ROWS</b> (the last entry of node1).
What happend? How I could solve this?
Thanks.
Hi Anja,
It is better to loop throgh source node and create element of destnode, set the values and add element to destnode.
IWDNode srcNode = (IWDNode)wdContext.node1();
IWDNode destNode = (IWDNode)wdContext.node2();
srcNode.moveFirst();
for(int i=0;i<srcNode.size;i++)
{
destNodeElement a= destNodeElement.createElement();
a.set....
destNode.addelement(a);
}
Regards,
ganga.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I solved it.
Thanks a lot.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please post the exact context structure and how the table is bound to the context.
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
92 | |
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.