cancel
Showing results for 
Search instead for 
Did you mean: 

getting selected value of drop down list box

lakshmi_narayana2
Active Participant
0 Kudos

Hi

Am building a form with UI elements(Inputfield, dropdown by key,etc) and i need to add the values entered in the form elements to the back end.

How do i capture the UI elements values so that i can pass the same into my code and add them to backend.

Thanks in advance

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

UI element properties are bound to view context attributes. In an event handler you can access these attributes.

If you have a DropDownByKey UI element, you will have bound the property "selectedKey" to a context attribute. The currently selected key is the value of this attribute.

For an InputField, you will have bound the "value" property to a context attribute. The cuurent value in the InputField is the value of this attribute.

etc.

Armin

Former Member
0 Kudos

Hi,

You will be required to capture the value entered in input field and dropdownbykey when the end user press the submit button

For input field bind the value property to a context attribute say att1

For dropdownbykey bind the selectedkey property to a context attribute say att2

Associate the onAction property of button to an action

In the eventhandler of the action in implementation write

String val_inputfield = wdContext.currentContextElement.getAtt1()

String val_dropdown = wdContext.currentContextElement.getAtt1()

You will get the values entered

Regards

Rohit