Skip to Content
avatar image
Former Member

WDCOPYSERVICE

I want to copy one node element to another.

the scenario is am displaying material data and in that i want to change the material details and save it. for this how can i implement copycorresponding method of wdcopyservice

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Jan 03, 2006 at 10:51 AM

    Hello,

    Use the following pointer code to do that:

    WdCopyService.copyCorresponding(sourceNode,targetNode);

    Bala

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Renu,

      If you are using

      public static void copyCorresponding(java.lang.Object source, java.lang.Object target)

      in WDCopySertvice both the source and target should be node elements having the same structure.

      If the basic types of the attributes are not compatible the values are discarded

      Get the element of the source node

      IPrivate<view name>.I<node name>Element ele = wdcontext.node<node name>.get<node name>ElementAt(index);

      Get the value of attribute make the changes and set the value accordingly

      create an element of second node

      IPrivate<view name>.I<node name>Element ele = wdcontext.node<node name>.create<node name>Element()

      then use copyCorresponding()

      hope this helps you

      Regards

      Rohit

      Message was edited by: Rohit Radhakrishnan