cancel
Showing results for 
Search instead for 
Did you mean: 

how to get data from one ui element?

Former Member
0 Kudos

hi all

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

thanks

Accepted Solutions (1)

Accepted Solutions (1)

nikhil_bose
Active Contributor
0 Kudos

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

Answers (4)

Answers (4)

Former Member
0 Kudos

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

Former Member
0 Kudos

proved what helped me, thanks

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

Former Member
0 Kudos

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

former_member191569
Active Participant
0 Kudos

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: