What's the signature of companyModel's getUser method? I'd expect that Wicket would be looking for a "String getUser()" method to call...
/Gwyn On 03/08/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 /Gwyn -- Download Wicket 1.2.1 now! - http://wicketframework.org Wiki: http://wicketframework.org/wiki Examples: http://wicketframework.org/Examples.html ------------------------------------------------------------------------- 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