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

how to get data from one ui element?

hi all

I have a DropDownByIndex and I know how I can get the value selected

thanks

Add a comment
10|10000 characters needed characters exceeded

Related questions

5 Answers

  • Best Answer
    Posted on Dec 19, 2008 at 04:43 AM

    DropDownByIndex : is used when values for the drop down list are available in a context node.

    Context

    List (Node 0..n)

    Value(attribute String)

    Bind 'Value' to DDBYINDX texts property.

    Supply context values. you can get the selected element by

    wdContext.currentListElement().getValue();

    nikhil

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 19, 2008 at 01:27 AM

    You should have binded a context atribute to the dropdown list (otherwise you will get an erro in build time). Retrieving the value of that attribute is enough:

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 19, 2008 at 04:38 AM

    HI,

    suppose the dropdownbyindex is bind with the attribute "testName" in the node "Test".

    so the context is like

    Test

    .....testName

    .....

    so to get the selected value do like this

    wdContext.nodeTest().getTestElementAt(wdContext.nodeTest().getLeadSelection()).gettestName();

    hope it clear!

    Regards,

    ramesh

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 19, 2008 at 04:54 AM

    proved what helped me, thanks

    Edited by: Pablo Umaña on Dec 19, 2008 5:56 AM

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 19, 2008 at 06:33 AM

    Hi,

    write this code in onSelect() Event of DrowdownbyIndex.

    String ss=wdContext.currentContextElement().getObject();

    wdContext.currentContextElement().setText(ss);

    getObject() means drowdownbyindex binded attribute.

    setText() means Textfield binded attribute.

    Regards,

    Sunaina Reddy T

    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.