Display the selected value of a dropdown to a text field

I tried to add code in dropdown_valueChange method to make a text filed always displaying the current selected value of the dropdown box. (in java class). it did not work.I would like to know the correct way to make it work.
[238 byte] By [pmohjps] at [2007-11-26 9:11:22]
# 1
Did you set "Auto-submit on change" in the right-click menu of the drop down list?Unless you are using an AJAX component or otherwise calling Javascript on the cleint, you need to submit the form to get the update.
dkible at 2007-7-6 23:31:25 > top of Java-index,Development Tools,Java Tools...
# 2

Hello friend here is the solution to ur problem

right click on the dropdown list and select auto-sbmit on change from the drop down menu. when u set auto-sbmit on change it fires automatically valuechange action of the dropdown list.

here is the complete code for dropdown list

public void dropDown1_processValueChange(ValueChangeEvent event) {

String name=(String)(dropDown1.getSelected());

textField1.setText(name);

}

with the above code u can go ahead. good luck for all ur works.

Regards

-

Anandkumar

Anandkumar_India at 2007-7-6 23:31:25 > top of Java-index,Development Tools,Java Tools...