[ https://issues.apache.org/jira/browse/TAP5-213?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12671852#action_12671852 ]
Thiago H. de Paula Figueiredo commented on TAP5-213: ---------------------------------------------------- Tapestry CRUD (http://www.arsmachina.com.br/project/tapestrycrud/concepts) tackles this problem in a very different , more reusable way. It provides SingleTypeSelectModelFactory, an interface that defines a factory of SelectModel instances for a given type. It also provides SelectModelFactory, a factory of SelectModel instances for any given type. This interface has two methods: SelectModel create(Class<?> clasz) (all the instances of a given class are included in the returned SelectModel) and <T> SelectModel create(Class<T> clasz, List<T> objects) (just the provided instances. Tapestry CRUD provides them without any configuration needed, as long as its conventions are followed. > Create an easier way to populate List of object to Select component > ------------------------------------------------------------------- > > Key: TAP5-213 > URL: https://issues.apache.org/jira/browse/TAP5-213 > Project: Tapestry 5 > Issue Type: Wish > Affects Versions: 5.0.15 > Reporter: Joshua Partogi > Assignee: Kevin Menard > > Create an easier way to populate List of object to Select component. > Currently we must create a class that implement SelectModel and a class that > implement ValueEncoder. Perhaps it would be nice if there property in the > Select component such as list that corresponds to the list of object to be > displayed for the combobox as such: > <select t:type="Select" t:id="member" model="member" list="members" /> > and the Page class as such: > private List<Member> members; > public List<Member> getMembers() > { > return members; > } > public void setMembers(List<Member> members) > { > this.members = members; > } > @SetupRender > public void init(){ > members = dao.getMembers(); > } -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.