Uploaded image for project: 'Seam 2'
  1. Seam 2
  2. JBSEAM-1228

Add sort option to <s:selectItems>

    Details

    • Type: Patch
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 1.2.1.GA
    • Fix Version/s: None
    • Component/s: JSF Controls
    • Labels:
      None

      Description

      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.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                pmuir Pete Muir
                Reporter:
                sbublava Stephan Bublava
              • Votes:
                1 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: