[jbossseam-issues] [JBoss JIRA] Commented: (JBSEAM-3254) <s:selectItems> broken in NumberGuess example

Stan Silvert (JIRA) jira-events at lists.jboss.org
Tue Aug 12 15:00:52 EDT 2008


    [ https://jira.jboss.org/jira/browse/JBSEAM-3254?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12424646#action_12424646 ] 

Stan Silvert commented on JBSEAM-3254:
--------------------------------------

I can't figure out how s.tld is generated.  But I noticed that the TLD has:

xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-jsptaglibrary_2_0.xsd"

<tlib-version>2.0</tlib-version>

I think you need to change these to 2.1.  In JSP 2.0, deferred values would be passed as Strings into the JSF component.  Then the JSF component would be responsible for evaluating the EL expression.  With JSP 2.1, EL evaluation is done before the component value is set.

Are the Seam components written as JSP 2.1 or JSP 2.0?

> <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

        



More information about the seam-issues mailing list