A reminder: org.apache.tapestry5.components.Select is not the only class allowed to render a <select> or <option> tag. Rather than bending code ment for one purpose too far, why not think in terms of a family of components that do similar things, but are applicable to different situations?
On Fri, Jun 3, 2011 at 5:24 PM, Taha Hafeez <tawus.tapes...@gmail.com> wrote: > Wrote a post about it. > > http://tawus.wordpress.com/2011/06/04/tapestry-magic-14-easy-selection/ > > and if you find it useful I can add it to the wiki. > > regards > Taha > > > On Fri, Jun 3, 2011 at 8:54 PM, Taha Hafeez <tawus.tapes...@gmail.com>wrote: > >> I use a configuration, which is similar to the one suggested by inge. The >> usage is >> >> @InjectSelectSupport(type = User.class, label = "${name}(${address})", >> index = "id") >> private List<User> users; >> >> >> Using a class transformation, it introduces a method >> >> public SelectSupport getUsersSupport(); >> >> in the component/page. So in template only >> >> <t:select t:model='usersSupport' t:encoder='usersSupport' t:value='user'/> >> >> is required >> >> regards >> Taha >> >> >> >> On Fri, Jun 3, 2011 at 5:39 PM, Bob Harner <bobhar...@gmail.com> wrote: >> >>> I would prefer to see something more familiar-looking: >>> >>> <t:select model="someList" value="oneItem"> >>> <option value="oneItem.id">${oneItem.name}</option> >>> </t:select> >>> >>> Not sure how possible that is. But it sure would be a lot more >>> flexible, and a lot easier for newbies to understand. >>> >>> On Fri, Jun 3, 2011 at 7:38 AM, Thiago H. de Paula Figueiredo >>> <thiag...@gmail.com> wrote: >>> > On Fri, 03 Jun 2011 08:22:13 -0300, LLTYK <ll...@mailinator.com> wrote: >>> > >>> >> How about a shorthand for selectmodelfactory calls. Something like >>> >> <t:select model="someList,valueProperty,labelProperty" /> >>> > >>> > This could (or should) be implemented as a binding prefix. >>> > >>> > -- >>> > Thiago H. de Paula Figueiredo >>> > Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, >>> and >>> > instructor >>> > Owner, Ars Machina Tecnologia da Informação Ltda. >>> > http://www.arsmachina.com.br >>> > >>> > --------------------------------------------------------------------- >>> > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org >>> > For additional commands, e-mail: users-h...@tapestry.apache.org >>> > >>> > >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org >>> For additional commands, e-mail: users-h...@tapestry.apache.org >>> >>> >> > -- Howard M. Lewis Ship Creator of Apache Tapestry The source for Tapestry training, mentoring and support. Contact me to learn how I can get you up and productive in Tapestry fast! (971) 678-5210 http://howardlewisship.com --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org