Skip to Content
author's profile photo Former Member
Former Member

How to add elements to value node at run time

I am totaly new to webdynpro, kindly help.

I have a value node "A" and corresponding value attribute say "b", I would like to add elements to "b" at run time like "10,20,30,40" , and wants to bind these elements to table column.

Thx

Manoj

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jun 09, 2006 at 12:37 PM

    hi

    check out this

    context

    |

    !__valuenode------valueattt (int)

    |

    |

    |

    |

    |

    |---userinputvalueattribute (int) (bind it to inout field for getting values from user)

    IPrivate<Viewname>.I<valuenode>Element x=wdContext.node<valuenode>().create<valuenode>Element();

    wdContext.nodeG<valuenode>().addElement(x);

    int val=wdContext.currentContextElement().get<userinputvalueattribute>();

    x.setvalueattr(val);

    hope this helps,

    regards,

    Arun

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 09, 2006 at 12:28 PM

    (I assume you mean adding elements with int values to node A and B be an integer attribute.)

    wdDoInit():

    for (int i = 10; i <= 40; i += 10)
    {
      IAElement a = wdContext.nodeA().createAndAddAElement();
      a.setB(i);
    }

    At design time, bind some suitable property of the table cell editor of that column (e.g. TextView.text, InputField.value) to the context attribute "B".

    Armin

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.