[
https://jira.jboss.org/jira/browse/JBSEAM-3254?page=com.atlassian.jira.pl...
]
Pete Muir commented on JBSEAM-3254:
-----------------------------------
I had a look, it appears that the JSP page is setting a ValueExpressionLiteral for the
#{numberGuess.possibilities} which therefore means that it's sets the String
#{numberGuess.possibilities} on the select items instance.
Stan, any idea why this would happen?
<s:selectItems> broken in NumberGuess example
---------------------------------------------
Key: JBSEAM-3254
URL:
https://jira.jboss.org/jira/browse/JBSEAM-3254
Project: Seam
Issue Type: Bug
Components: JSF Controls
Affects Versions: 2.1.0.A1
Reporter: Stan Silvert
Assignee: Pete Muir
Fix For: 2.1.0.BETA1
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> ?
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira