[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-1648) Seam 2.0.0 Beta1: using noSelectionLabel attribute of <s:selectItems causes value attribute of <h:selectOneMenu to be ignored.
Jennifer Miller (JIRA)
jira-events at lists.jboss.org
Wed Jul 11 18:25:31 EDT 2007
Seam 2.0.0 Beta1: using noSelectionLabel attribute of <s:selectItems causes value attribute of <h:selectOneMenu to be ignored.
------------------------------------------------------------------------------------------------------------------------------
Key: JBSEAM-1648
URL: http://jira.jboss.com/jira/browse/JBSEAM-1648
Project: JBoss Seam
Issue Type: Bug
Affects Versions: 2.0.0.BETA1
Environment: JBoss 4.2.0 GA
Java 1.6.0_02
Seam 2.0 Beta 1
JSF 1.2
Reporter: Jennifer Miller
There seems to be an issue with s:selectItems. Specificly, using the noSelectionLabel attribute causes incorrect html output. Before upgrading to Seam 2.0.0 Beta1 from Seam 1.2.1GA the following snippit of code worked correctly:
<h:selectOneMenu id="selectRequestType"
value="#{serviceRequest.requestType}"
converter="requestTypeConverter"
styleClass="field"
onchange="loadServiceValues(this.options[this.selectedIndex].value)"
required="false">
<s:selectItems value="#{lookupTable.requestTypes}"
var="type"
label="#{type.name}"
noSelectionLabel="-- select --" />
</h:selectOneMenu>
After upgrading the generated html correctly concists of a <select> with <option> elements that match the list from [ lookupTable.requestTypes ]. However, the <option> matching [ serviceRequest.requestType ] (the selected option) did not have [ selected="true" ]. The [ selected="true" ] attribute is missing from the selected <option> element.
If [ noSelectionLabel="--select --" ] is deleted from the above snipet of code the error does not occur. The selected <option> is output with [ selected="true" ].
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the seam-issues
mailing list