[jbossseam-issues] [JBoss JIRA] Commented: (JBSEAM-3596) Add @SelectItems for exporting a list or hash to a List<SelectItem> context variable

Pete Muir (JIRA) jira-events at lists.jboss.org
Tue Oct 21 07:09:20 EDT 2008


    [ https://jira.jboss.org/jira/browse/JBSEAM-3596?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12434619#action_12434619 ] 

Pete Muir commented on JBSEAM-3596:
-----------------------------------

Why? We already solved this problem with a JSF control.

> 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
>    Affects Versions: 2.1.0.CR1
>            Reporter: Dan Allen
>            Priority: Minor
>             Fix For: 2.1.1.CR1
>
>   Original Estimate: 4 hours
>  Remaining Estimate: 4 hours
>
> 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