new ChoiceRenderer("name", "id") will effect in calls to getName and getId on the user object. If it can't find that property, it will throw an exception (PropertyResolver.getValue is used to get the property value). If that doesn't happen, something else is wrong/ overlooked.
Eelco On 8/3/06, Pierre-Yves Saumont <[EMAIL PROTECTED]> wrote: > Sorry, I made a mistake. The object do have a "user" property, but > Wicket is still using toString(). Is it normal ? > > Pierre-Yves > > Pierre-Yves Saumont a écrit : > > In the Javadoc, it is written that only with this syntax : > > > > new DropDownChoice("users", new Model(selectedUser), listOfUsers) > > > > will toString() be used for display value. > > > > However, what happens with a syntax like : > > > > DropDownChoice laboratoireDropDown = new DropDownChoice( > > "users", new PropertyModel(companyModel, "user"), > > listOfUsers, > > new ChoiceRenderer("name", "id")); > > > > if the object returned by propery "user" of companyModel has no property > > "name" ? > > > > I thought it would throw an exception, but it seems it is silently using > > toString()??? > > > > > > Pierre-Yves > > > > > > ------------------------------------------------------------------------- > > Take Surveys. Earn Cash. Influence the Future of IT > > Join SourceForge.net's Techsay panel and you'll get the chance to share your > > opinions on IT & business topics through brief surveys -- and earn cash > > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > > _______________________________________________ > > Wicket-user mailing list > > Wicket-user@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/wicket-user > > > > > > > > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys -- and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user > ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user