[seam-issues] [JBoss JIRA] (JBSEAM-5052) s:selectItems noSelectionLabel causes errors without using ui:debug

Marek Novotny (JIRA) jira-events at lists.jboss.org
Mon Oct 8 16:48:03 EDT 2012


     [ https://issues.jboss.org/browse/JBSEAM-5052?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Marek Novotny updated JBSEAM-5052:
----------------------------------

    Description: 
UI example of <s:selectItems> can show this issue when <ui:debug> is removed from examples/ui/ui-web/src/main/webapp/template.xhtml.

The converter "org.jboss.sema.ui.NoSelectionConverter" is not firing when rendering the page. Converters are however fired for other selectOneMenu items on the page that have one or more items.


  was:
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.


    
> s:selectItems noSelectionLabel causes errors without using ui:debug 
> --------------------------------------------------------------------
>
>                 Key: JBSEAM-5052
>                 URL: https://issues.jboss.org/browse/JBSEAM-5052
>             Project: Seam 2
>          Issue Type: Bug
>          Components: JSF Controls
>    Affects Versions: 2.2.1.Final, 2.2.2.Final, 2.3.0.Final
>         Environment: JBoss AS 7.1.1
>            Reporter: Andrew Wheeler
>            Assignee: Marek Novotny
>              Labels: jsf
>             Fix For: 2.3.1.CR1
>
>   Original Estimate: 2 hours
>  Remaining Estimate: 2 hours
>
> UI example of <s:selectItems> can show this issue when <ui:debug> is removed from examples/ui/ui-web/src/main/webapp/template.xhtml.
> The converter "org.jboss.sema.ui.NoSelectionConverter" is not firing when rendering the page. Converters are however fired for other selectOneMenu items on the page that have one or more items.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the seam-issues mailing list