[ 
https://issues.apache.org/jira/browse/TAPESTRY-1743?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12545316
 ] 

Joshua Partogi commented on TAPESTRY-1743:
------------------------------------------

There's been some excellent work written on the wiki.

http://wiki.apache.org/tapestry/Tapestry5SelectObject
This ones creates a new component. But this one does not have id field for the 
select's value attribute.

http://wiki.apache.org/tapestry/Tapestry5HowtoSelectWithObjects
This ones does not creates a new component. The good thing about it is it 
fetched the id property of the domain object to be used for the select's value 
attribute.

The best way is the mix of two of them. 
- Add a list property for the Select component
- and get the id property of the domain object for the select's value attribute

> Create an easier way to populate List of object to Select component
> -------------------------------------------------------------------
>
>                 Key: TAPESTRY-1743
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-1743
>             Project: Tapestry
>          Issue Type: Wish
>          Components: Framework, tapestry-core
>    Affects Versions: 5.0.5
>            Reporter: Joshua Partogi
>             Fix For: 5.0.7
>
>
> 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.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to