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

Get selected value from DropdownByIndex

Hi

I have a DropdownByIndex which i have bind to a model attribute which is a part of internal table now i want to get the selected value of that dropdown. How can i get that value here.

Thanks

Ninad

Add comment
10|10000 characters needed characters exceeded

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Aug 02, 2006 at 01:40 PM

    Hi Ninad,

    You must have bound the "texts" property of the dropdown to some model node attribute. You can just get the elemnt at leadSelection of the model node and access the attribute.

    If your context looks like this:

    -Root

    --ModelNode

    ---Text(bound to your dropdown)

    then you can do

    wdContext.
    nodeModelNode.
    getElementAt(wdContext.nodeModelNode.getLeadSelection()).
    getAttributeValue("Text");
    

    Regards,

    Satyajit.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi,

      I think after clicking the button,page again refershed. So you got same value as first value. So you have to handle manually after button put (Mukeshmani code). Your problem might be solved.

      Kind Regards,

      S.Saravanan.

  • author's profile photo Former Member
    Former Member
    Posted on Aug 02, 2006 at 02:05 PM

    Hi

    Try this,

    String selected=wdContext.current<TableNode>Element().get<Parameter>();

    Kind Regards

    Mukesh

    Message was edited by: Mukesh mani

    Add comment
    10|10000 characters needed characters exceeded