I had the same problem you do. Solved it by doing
lstNationality.setDefaultModel(new
PropertyModel<Nationality>(getDefaultModel(), "nationality"));
but I bet you that Igor is gonna jump right in an say how its supposed
to be done and why.
//Swanthe
On 2010-04-28 16:20, Josh Kamau wrote:
Hi team
I need your help
I am using a DropDownChoice<T> in a form as follows:
DropDownChoice<Nationality> lstNationality = new
DropDownChoice<Nationality>("nationality",getNationalities());
The form has a CompoundPropertyModel
After adding the dropdown to the form, i am able to save the record
properly. However, when i display a form with an existing record,
the DropDownChoice is not showing the current 'nationality' and it is only
showing "Choose One";
When i replace is with a textfield, the correct record is displayed. Is
where could i be going wrong?
Regards.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]