Hi wicketeers I have a "small" problem with DropDownChoice that I have been staring
at for hours... Now I have a ListView containing two textfields (working fine!) and a dropdownbox. And this is my problem. ============================== add (new ListView("partnerListe", partner){ protected void populateItem(final ListItem item) { final TilknyttetGruppeVO gruppe = (TilknyttetGruppeVO) item.getModelObject(); item.add (new TextField("personnavn", new PropertyModel(gruppe, "personnavn"))); item.add (new TextField("email", new PropertyModel(gruppe, "email"))); item.add (new DropDownChoice("rolle", new PropertyModel(gruppe, "rolleId"), roller, new ChoiceRenderer("name", "id"))); item.add (new Link("delete") { public void onClick() { sag.getTilknyttetGrupper().remove(gruppe); } }); } }); =============================== The roller, which is a list containing POJO from the DB is also given in the contructor to the dropdownchoice. ====================== private class Rolles implements Serializable { int id; String name; public getter / setter ====================== Now when I submit the Form including the selected value of the dropdownchoice I get the following error. I seems to me that when DropDownChoice updates its model it uses toString() instead the setMethod given in the ChoiceRenderer... ============================= wicket.util.convert.ConversionException: Cannot parse '[EMAIL PROTECTED]' using format [EMAIL PROTECTED] at wicket.util.convert.converters.AbstractConverter.newConversionException (AbstractConverter.java:72) at wicket.util.convert.converters.AbstractConverter.parse( AbstractConverter.java:52) at wicket.util.convert.converters.AbstractNumberConverter.parse (AbstractNumberConverter.java:64) at wicket.util.convert.converters.LongConverter.convert(LongConverter.java:44) at wicket.util.convert.Converter.convert(Converter.java:200) at wicket.util.lang.PropertyResolver$MethodGetAndSet.setValue (PropertyResolver.java:822) at wicket.util.lang.PropertyResolver$ObjectAndGetSetter.setValue (PropertyResolver.java:441) at wicket.util.lang.PropertyResolver.setValue(PropertyResolver.java:136) at wicket.model.AbstractPropertyModel.onSetObject (AbstractPropertyModel.java:176) =============================== What am I missing...??? Regards Flemming ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 _______________________________________________ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user