[
http://jira.jboss.com/jira/browse/JBSEAM-1648?page=all ]
Jennifer Miller updated JBSEAM-1648:
------------------------------------
Summary: After upgrade to Seam 2.0.0 Beta1 value attribute of
<h:selectOneMenu is ignored. (was: Seam 2.0.0 Beta1: using noSelectionLabel attribute
of <s:selectItems causes value attribute of <h:selectOneMenu to be ignored.)
Workaround Description: (was: If noSelectionLabel is not used the error will not
occur. )
Description:
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="selected" ]. The selected attribute is missing from the
selected <option> element.
Other h:select... elements still work in Beta1. All the ones that still work do not use
noSelectionLabel attribute and also don't use a coverter.
was:
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" ].
Workaround: (was: [Workaround Exists])
After upgrade to Seam 2.0.0 Beta1 value attribute of
<h:selectOneMenu is 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="selected" ]. The selected attribute is missing from the
selected <option> element.
Other h:select... elements still work in Beta1. All the ones that still work do not use
noSelectionLabel attribute and also don't use a coverter.
--
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