Hi,

I also bumped into this matter when starting with Wicket, make sure the
Collection returned by getNationalities() contains the value of the
'nationality' attribute of the CPM's backing object, or use a suitable
ChoiceRenderer, as Wilhelmsen suggests, in order to be able to put as
choices the same objects you can have in the 'nationality' attribute.

I think the DDC's ModelObject has to be/will be one of the objects in the
choices list before rendering/after form submission

Cheers,
Xavier

2010/4/28 Wilhelmsen Tor Iver <toriv...@arrive.no>

> > 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";
>
> Sounds like Wicket gets confused regarding value/id, try setting an
> IChoiceRenderer, e.g.
>
> lstNationality.setChoiceRenderer(new ChoiceRenderer("name", "id"));
>
> - Tor Iver
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
"Klein bottle for rent--inquire within."

Reply via email to