Hi all,
I have a similar problem:
Put a DropDownList on the form and a Button, in the init method fill the dropdown list with some values:
ArrayList alList = new ArrayList();
if(isPostBack() == false) {
alList.add(new Option(1, "test 1"));
alList.add(new Option(2, "test 2"));
this.dropDown1.setItems(alList);
}
Select a value in the Dropdown and press the button, you get the selected value correctly in the eventhandler but the dropdown looses the selected value after the postback.
I am using Netbeans 6.5 and a Glassfish v2 (build using
J2EE).
Does somebody can help or have a hint for me ?
(Normally I come from the ASP.NET World / C++ World so please forgive
me my small
java knowledge...)
Kind regards
Christian