[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-3596) Add @SelectItems for exporting a list or hash to a List<SelectItem> context variable
Dan Allen (JIRA)
jira-events at lists.jboss.org
Tue Oct 21 01:54:20 EDT 2008
Add @SelectItems for exporting a list or hash to a List<SelectItem> context variable
------------------------------------------------------------------------------------
Key: JBSEAM-3596
URL: https://jira.jboss.org/jira/browse/JBSEAM-3596
Project: Seam
Issue Type: Feature Request
Components: Core
Reporter: Dan Allen
Priority: Minor
Fix For: 2.1.0.GA
There are times when the UI needs a collection of SelectItem objects, yet the business logic does not need to be aware of this requirement. Thus, we have a similar situation as with JSF data models.
It would be helpful to have an annotation counterpart to @DataModel named @SelectItems that outjects a list or hash as a list of SelectItem objects. If the property's type is a list, the label is assumed to be the same as the value. If the property's type is a hash, the entry's key is the option value and the entry's value is the option label.
@SelectItems
List<String> options;
@SelectItems
Hash<String, String> options;
In the case of a list, we could allow a label to be defined using path notation in an annotation property named labelPath.
@SelectItems(labelPath = "name")
List<User> users;
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the seam-issues
mailing list