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

s:selectItems noSelectionLabel does not generate option value

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Out of Date
    • Affects Version/s: 2.2.1.CR1
    • Fix Version/s: 2.3.0.CR1
    • Component/s: JSF Controls
    • Labels:
    • Environment:

      JBoss 6 M3

      Description

      When a selectOneMenu has no items other than the no selection option it does not render the option value as org.jboss.seam.ui.NoSelectionConverter.noSelectionValue. In this case the there are no values in person.images.

      <h:selectOneMenu id="portrait" value="#

      {person.portrait}

      ">
      <s:selectItems value="#

      {person.images}

      " var="i" label="#

      {i.annotation}

      " hideNoSelectionLabel="false" noSelectionLabel="Select a portrait..."/>
      <s:convertEntity/>
      </h:selectOneMenu>

      This renders:
      <select id="person:portraitDecoration:portrait" name="person:portraitDecoration:portrait" size="1"> <option selected="selected">Select a portrait...</option>
      </select>

      The result is that any form submit causes a java.lang.NumberFormatException with message: "For input string: "Select a portrait...""

      I have debugged a little and I can see that the converter is not firing when rendering the page. It does however fire for other selectOneMenu items on the page that have one or more items.

      A similar and perhaps related issue is referenced in the JBoss Forum.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  manaRH Marek Novotny
                  Reporter:
                  fastroller Andrew Wheeler
                • Votes:
                  5 Vote for this issue
                  Watchers:
                  14 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    Time Tracking

                    Estimated:
                    Original Estimate - 2 hours
                    2h
                    Remaining:
                    Remaining Estimate - 2 hours
                    2h
                    Logged:
                    Time Spent - Not Specified
                    Not Specified