[seam-issues] [JBoss JIRA] Issue Comment Edited: (JBSEAM-4654) s:selectItems noSelectionLabel does not generate option value
Peter Nguyen (JIRA)
jira-events at lists.jboss.org
Tue Apr 12 10:21:33 EDT 2011
[ https://issues.jboss.org/browse/JBSEAM-4654?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12595025#comment-12595025 ]
Peter Nguyen edited comment on JBSEAM-4654 at 4/12/11 10:20 AM:
----------------------------------------------------------------
Hi,
I'm also experiencing the same issue with Seam 2.2.1.Final running on AS 6.0.0 Final. I've tested Craig's work around with Mojarra 1.2 and can confirm that it works.
was (Author: peter.nguyen):
Hi,
I'm also experiencing the same issue with Seam 2.2.1.Final running on AS 6.0.0 Final. I've tested Craig's work around with Mojarra 1.2 and can confirm that it works - which is unfortunate if you're looking to use 2.0.
> s:selectItems noSelectionLabel does not generate option value
> -------------------------------------------------------------
>
> Key: JBSEAM-4654
> URL: https://issues.jboss.org/browse/JBSEAM-4654
> Project: Seam 2
> Issue Type: Bug
> Components: Core
> Affects Versions: 2.2.1.CR1
> Environment: JBoss 6 M3
> Reporter: Andrew Wheeler
>
> 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.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the seam-issues
mailing list