Skip to Content
avatar image
Former Member

Transfer values within a context

Hi all,

Anybody knows how to assign the value of a DropDownByIndex element (Attribute A10 in Node N1) to another element in another node (Attribute A20 in Node N2) in the same View Context. The structure of the View context is as follows.

NodeN1

-Attrib A10

Node N2

-Attrib A20

-Attrib A21

-Attrib A22

-Attrib A23

Regds

Thiru

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Best Answer
    avatar image
    Former Member
    Apr 20, 2007 at 08:19 AM

    Hi Thiruvengadam Dorairaj,

    You can do as follows:

    If both data types of A10 and A20 are same,

    wdContext.currentNodeN2Element().setA20(wdContext.currentNodeN1Element().getA10())

    Thanks,

    Shiva

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 20, 2007 at 08:05 AM

    Hi

    Try to set the attribute by writing code

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 20, 2007 at 08:11 AM

    Hi Thiruvengadam,

    Try this

    IWDNodeElement node = wdContext.nodeDropDownByIndexVNode().getElementAt(10);

    wdContext.currentNodeN2Element.setAttr20(node.getAttributeAsText("AttrA10"));

    Regards

    Sid

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 20, 2007 at 08:20 AM

    hi,

    I hope attribute here you are talking about are value attribute, do as follows,

    IPrivate<View name>View.INodeN1Element eleN1 = wdContext.currentNodeN1Element();

    IPrivate<View name>View.INodeN2Element eleN2 = wdContext.currentNodeN2Element();

    eleN2.setAttributeA20(eleN1.getAttribuiteA10()); // this will do the assignment task

    i assumed your context is defiend design time and attribute A10 etc are value attributes

    hope it helps

    regards

    Add comment
    10|10000 characters needed characters exceeded