cancel
Showing results for 
Search instead for 
Did you mean: 

Copy Collection of an Conext Node to an other

Former Member
0 Kudos

Hello,

I have these context nodes:

RequestFindPerson

---ResponseFindPerson

------returnFindPerson

----


name

----


firstName

LocatedPerson

---name

---firstName

ReturnFindPerson and LocatedPerson are of the same data type. I'm able to copy several elements from returnFindPerson to LocatedPerson. But how can I copy the whole collection from returnFindPerson to LocatedPerson? I tried this way:

After I have execute the RequestFindPerson:

wdThis.wdGetContext().currentRequestFindPersonElement().modelObject().execute();

I tried:

Collection requestFindPersons = wdThis.wdGetContext().nodeRequestFindPerson().getModelCollection();

wdThis.wdGetContext().nodeLocatedPersons().bind(requestFindPersons);

But the Collection is always null.

What's the right way to copy the wohle collection as the case may be all elements.

Regards,

Armin

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Use WDCopyService.copyCorresponding(Object source, Object target)

http://help.sap.com/javadocs/NW04S/current/wd/com/sap/tc/webdynpro/progmodel/api/WDCopyService.html

Regards

Ayyapparaj

Answers (0)