Hallo,
try something like this:
List<Country> countryList = generalDAO.findAllCountries();
Country country = getSelectedCountryByISO3(141, countryList);
inal DropDownChoice<Cointry> countryId = new
DropDownChoice<Country>("countryId",
new Model<Country>(country), countryList);
add(countryId);
You must pass the model, which contains the element you want to select.
Vitek
Sigmar Muuga wrote:
Hello, I am trying to use one of the hardest part in Wicket: DropDownChoice
the code looks like this:
List<Country> countryList = generalDAO.findAllCountries();
Country country = getSelectedCountryByISO3(141, countryList);
final DropDownChoice countryId = new DropDownChoice("countryId",
new PropertyModel(country, "id"), countryList);
add(countryId);
I want to select an item, and set it selected on my dropdown, but its not
selected. How to set the selected value for it?
Sigmar
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]