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

<s:selectItems> broken in NumberGuess example

    XMLWordPrintable

    Details

      Description

      When you run the Numberguess example, you get to a point where the numberGuess page switches to showing a dropdown of choices:
      <h:selectOneMenu value="#

      {numberGuess.currentGuess}" id="selectGuessMenu" required="true"
      rendered="#{(numberGuess.biggest-numberGuess.smallest) le 20 and (numberGuess.biggest-numberGuess.smallest) gt 4}">
      <s:selectItems value="#{numberGuess.possibilities}" var="i" label="#{i}" />
      </h:selectOneMenu>
      <h:selectOneRadio value="#{numberGuess.currentGuess}

      " id="selectGuessRadio" required="true"
      rendered="#

      {(numberGuess.biggest-numberGuess.smallest) le 4}

      ">
      <s:selectItems value="#

      {numberGuess.possibilities}

      " var="i" label="#

      {i}

      " />
      </h:selectOneRadio>

      At that point, you will get an IllegalArgumentException as similar to the last comment of JBSEAM-880:
      java.lang.IllegalArgumentException: Expected a child component type of UISelectItem/UISelectItems for component type javax.faces.SelectOne(selectGuessMenu). Found java.lang.String.
      com.sun.faces.renderkit.RenderKitUtils.getSelectItems(RenderKitUtils.java:357)

      If I add a noSelectionLabel to each <s:selectItems> then the IllegalArgumentException will go away, but the values do not populate the dropdown.

      It looks like there might be something wrong deep inside <s:selectItems> ?

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                pmuir Pete Muir
                Reporter:
                ssilvert Stan Silvert
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: