cancel
Showing results for 
Search instead for 
Did you mean: 

move/copy context a to context b

Former Member
0 Kudos

hello everybody,

although i noticed some threads about this topic i didn't find the big answer yet.

In a view i have a contextNode which contains attributes. in the context menue i copy/pasted table1 and obtained table2. So now i have Node Table1, and Table2 (both with same attributes).

During runtime table1 is filled and later manipulated.

I need table2 to save the original table1-data. (i found a workaround for this, but i am definitly intereted in shifting context around)

Is there some way to do something like this:

<b>wdContext.nodeTable1 = wdContext.nodeTable2</b>

thanks for hints,

matthias

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Attribute names may not be same

Ex:

Data

--Node

Data_1

---Node1

WDCopyService.copyElements( wdContext.nodeData(),wdContext.nodeData_1());

Regards, Anilkumar

Message was edited by: Anilkumar Vippagunta

Former Member
0 Kudos

Hi Anilkumar Vippagunta and Bharatwaji,

thanks to both of you equally. As I can award 10 points only once, I shall deliver 10 to Anilkumars, as his note contains the very complete solution, 6 go to Bharatwaji.

regards,

Matthias

Answers (4)

Answers (4)

former_member182372
Active Contributor
0 Kudos

Matthias, what kind of nodes do you have? Model or value? From where data is comming?

Former Member
0 Kudos

Hi Bharat,

I am sorry. Attribute names should be same !!

Thanks for correctng me

Regards, Anilkumar

Former Member
0 Kudos

Hi Anil,

But if i have three attributes of type string in node A and node B ... and want to copy from node A to node B how will it match the atributes.. which string value will get copied to which attribute in node B.. How does it recognize that ?

Regards

Bharathwaj

Former Member
0 Kudos

Hi,

Use WDCopyService.copyElements(nodea the source,nodeb the dest)

The attr names should be same and thier type similar

Regards

Bharathwaj