cancel
Showing results for 
Search instead for 
Did you mean: 

How can I access the selected element of a DropDownByIndex-box?

Former Member
0 Kudos

Hi,

I want to create a WebDynpro with two web services. I created the first request with the first web service and the results are displayed in a DropDownByIndex-Box. Now the user should choose one of the results and I would like to use this for the request with my second web service. How can I access the selected Element of a DropDownByIndexBox in the Code?

Thank you!!

Julia

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Julia,

when user select one element in drop down it automatically set lead selection of node binded to dropdown.

For example if you bind a dropdown to node myNode with value attribute myAttribute the lead selection of node myNode is set in the position of element choose from user.

So to take this chooised element use this code:

wdContext.currentMyNodeElement.getmyAttribute()

bye

Andrea

Answers (2)

Answers (2)

Former Member
0 Kudos

Thank you!

Former Member
0 Kudos

Hi Julia,

You would have bound the 'texts' property of the DropDownBI to an attribute inside a node. The statement to access the selected value is :

wdContext.current<name of the node>Element().get<attribute name>();

Hope this helps,

Best Regards,

Nibu.