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

s:selectItems noSelectionLabel issue w/JSF 1.2

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 1.2.0.GA
    • Fix Version/s: 1.2.1.GA
    • Component/s: JSF Integration
    • Labels:
      None
    • Environment:

      Latest Seam version. JSF 1.2, Facelets, JBoss 4.0.5 on OS X 10.4.9.

      Description

      <h:selectOneMenu value="#

      {criteria.operation}

      ">
      <s:selectItems value="#

      {itemSearch.operations}

      " var="operation"
      label="#

      {operation.description}

      "
      noSelectionLabel="Select operation..."
      hideNoSelectionLabel="false" />
      <s:convertEnum />
      </h:selectOneMenu>

      produces the following exception:

      Caused by: java.lang.IllegalArgumentException: No enum const class com.fb.core.model.cdm.CdmField.Se
      lect search field...
      at java.lang.Enum.valueOf(Enum.java:192)
      at org.jboss.seam.ui.EnumConverter.getAsObject(EnumConverter.java:16)
      at org.jboss.seam.ui.PrioritizableConverter.getAsObject(PrioritizableConverter.java:61)
      at org.jboss.seam.ui.ConverterChain.getAsObject(ConverterChain.java:103)
      at com.sun.faces.renderkit.html_basic.HtmlBasicInputRenderer.getConvertedValue(HtmlBasicInputRender
      er.java:152)
      at com.sun.faces.renderkit.html_basic.MenuRenderer.convertSelectOneValue(MenuRenderer.java:197)
      at com.sun.faces.renderkit.html_basic.MenuRenderer.getConvertedValue(MenuRenderer.java:359)
      at javax.faces.component.UIInput.getConvertedValue(UIInput.java:934)

      This worked fine before I upgraded to JSF 1.2 (tonight) - though I also upgraded to the latest Seam at the same time.

      The problem is that the noSelectionLabel is being interpreted as a legitimate selection, rather than being, well, an indicator nothing was selected.

      The converter is being asked to convert the noSelection value back into an enum.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                pmuir Pete Muir
                Reporter:
                stu2 Stuart Robertson
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: