You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Andreas Andreou (JIRA)" <ta...@jakarta.apache.org> on 2006/08/09 04:01:15 UTC
[jira] Resolved: (TAPESTRY-628) BeanPropertySelectionModel
[ http://issues.apache.org/jira/browse/TAPESTRY-628?page=all ]
Andreas Andreou resolved TAPESTRY-628.
--------------------------------------
Fix Version/s: 4.1
Resolution: Fixed
There's a similar BeanPropertySelectionModel in org.apache.tapestry.form
> BeanPropertySelectionModel
> --------------------------
>
> Key: TAPESTRY-628
> URL: http://issues.apache.org/jira/browse/TAPESTRY-628
> Project: Tapestry
> Issue Type: Improvement
> Components: Framework
> Affects Versions: 4.0
> Reporter: Leonardo Quijano Vincenzi
> Priority: Minor
> Fix For: 4.1
>
> Attachments: BeanPropertySelectionModel.java.patch
>
>
> Sometimes it's useful to bind a list of JavaBeans to a PropertySelect, and have Tapestry display a property (labelProperty), and use another property as the selected value (valueProperty). That would allow us to include database lists (probably instantiated using Hibernate or some other ORM) directly on the page, as model for the SELECT.
> A simple implementation would go like this:
> public class BeanPropertySelectionModel<E> implements IPropertySelectionModel {
> public BeanPropertySelectionModel(List<E> options, String labelProperty, String valueProperty);
>
> public String getLabel(int index);
>
> public E getOption(int index);
> }
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org