Skip to Content
avatar image
Former Member

Set, get attributes between two nodes

Hi all,

I have a context node which has an attribute(of type string) that needs to be copied to another field that corresponds to the attribute of another node.

Please let me know how to do it.

Thanks & Best Regards,

Srilakshmi B

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

5 Answers

  • avatar image
    Former Member
    Feb 16, 2009 at 08:19 AM

    Hi

    use WDCpoyService();

    public static void copyCorresponding(Object source, Object target)

    thanks

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Feb 16, 2009 at 08:21 AM
    wdContext.currentTargetNodeElement().setStrAttrubute( 
                                         wdContext.currentSourceNodeElement().getStrAttribute());
    

    or

    WDCopyService.copyCorresponding( wdContext.currentSourceNodeElement(), wdContext.currentTargetNodeElement());
    

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Feb 16, 2009 at 08:23 AM

    Hi Srilakshmi,

    If you binded those two attributes to 2 different input fields,

    say the node structure be the following

    node1

    - val1

    node2

    - val2

    say u copy val2 into val1.

    wdContext.currentNode1Element().setVal1(wdContext.currentNode2Element().getVal2());

    Regards,

    Sam Charles J.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Feb 16, 2009 at 09:27 AM

    Hi,

    Make this a calculated attribute and in the get/set method assign the values to the other attribute..

    To do this select the attribute and go the properties view and set the calculated property to true and read only to false.

    Regards

    Ayyapparaj

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Feb 16, 2009 at 09:32 AM

    Thank you

    Add comment
    10|10000 characters needed characters exceeded