Re: [Wicket-user] Question about ChoiceRenderer
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
Re: [Wicket-user] Question about ChoiceRenderer
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
Re: [Wicket-user] Question about ChoiceRenderer
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
[Wicket-user] Question about ChoiceRenderer
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