cancel
Showing results for 
Search instead for 
Did you mean: 

copy data in one attribute to another dynamic attribute

Former Member
0 Kudos

Hi,

here my requirement is move data in one physical attribute to another dynamic attribute means in one physical attribute dropdown data is there(this data inserted by using valueset) but i want to move this data to another dynamically created attribute in modifyview.how can it is possible.

Regards,

surya.

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

self

Former Member
0 Kudos

Hi surya,

What i think is that you need to incorporate the above two post first create the node dynamically which i assume you already have done and then use the wdCopyservice.copyelement method instead of assigning values one by one to attributes.

Let us know if you need any more assistance in this.

Regards

Jeetendra

former_member192152
Active Participant
0 Kudos

Hi Surya,

maybe this code is not exactly what you want, but I hope that helps you.


  public void loadNodeDataOfSimilarAttributes( com.sap.tc.webdynpro.progmodel.api.IWDNode NodeSource, com.sap.tc.webdynpro.progmodel.api.IWDNode NodeDestination )
  {
    //@@begin loadNodeDataOfSimilarAttributes()
    int tamanhoVN = NodeSource.size();
    for (int i = 0; i < tamanhoVN; i++) {
        IPrivateCstCtrlLibera.IVnSourceElement element = wdContext.createVnSourceElement();
        Iterator iterator = NodeSource.getNodeInfo().iterateAttributes();
        while (iterator.hasNext()) {
            IWDAttributeInfo attrInfo = (IWDAttributeInfo) iterator.next();
            element.setAttributeValue(attrInfo.getName(), NodeSource.getElementAt(i).getAttributeValue(attrInfo.getName()));
        }
        NodeDestination.addElement(element);
    }
    //@@end
  }

best regards,

Angelo

or maybe you should use the method:


WDCopyService.copyElements(wdContext.nodeVnSource(), wdContext.nodeVnFiltered());

Edited by: Angelo Antonello Borges on Aug 26, 2010 4:46 PM

Former Member
0 Kudos

Hi,

you will create the node dynamically using

//Dynamically create a context node

IWDNodeInfo node = wdContext.getNodeInfo().addChild(

"DynamicNode",

null,

true,

true,

false,

false,

false,

true,

null,

null,

null);

you can get the reference of this node when ever you want. So after getting the node referece you can create the element for the reference and then add it to the node.

Regards,

Raju Bonagiri