[jbossseam-issues] [JBoss JIRA] Commented: (JBSEAM-1228) Add sort option to <s:selectItems>

Pete Muir (JIRA) jira-events at lists.jboss.org
Mon Apr 23 07:20:30 EDT 2007


    [ http://jira.jboss.com/jira/browse/JBSEAM-1228?page=comments#action_12360197 ] 
            
Pete Muir commented on JBSEAM-1228:
-----------------------------------

I can see there are some useful cases, but I'm really not sure that this is a good feature to add 

OTOH it would be cool to have have hooks in s:selectItems to support something like:

<s:selectItems ...>
   <my:sortList ... />
</s:selectItems>

and

<s:selectItems ... comparator="#{foo.comparator}" />

and perhaps include a 

<s:simpleSort direction="{ASC,DESC}" value="#{person.lastName}, #{person.firstName}" />

> Add sort option to <s:selectItems>
> ----------------------------------
>
>                 Key: JBSEAM-1228
>                 URL: http://jira.jboss.com/jira/browse/JBSEAM-1228
>             Project: JBoss Seam
>          Issue Type: Patch
>          Components: JSF
>    Affects Versions: 1.2.1.GA
>            Reporter: Stephan Bublava
>         Assigned To: Pete Muir
>             Fix For: 1.3.0.BETA1
>
>         Attachments: sort-selectitems-patch.txt
>
>
> The attached patch adds a sort option to <s:selectItems>, that allows the entries to be sorted by their label.
> Example:
> <h:selectOneMenu value="#{person.honorific}">
>     <s:selectItems value="#{honorifics}" var="honorific" label="#{honorific.label}" noSelectionLabel="Please select" sort="ascending" />
>     <s:convertEnum />
> </h:selectOneMenu>
> This version has not been tested in depth (especially interactions with "noSelectionLabel"), but I've been using similar code in our project (based upon Seam SelectItems 1.1.1beta1) for some time now and not encountered any problems.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the seam-issues mailing list