[
http://jira.jboss.com/jira/browse/JBSEAM-1648?page=comments#action_12369350 ]
Jennifer Miller commented on JBSEAM-1648:
-----------------------------------------
Pete and Norman, I figured out why this is not working and its not a Seam issue.
I looked at the converters and they are good. The issue turns out to be that the the
class being used (RequestType) did not have the equals method defined.
Everyone is sure the code worked before, so my "theory" is that prior to the
SEAM/JSF upgrade the RequestType was being converted to a String prior to the comparison
to determine the selected item. I can't think of how else it could have worked
before. It behaves as though the comparison is now being performed on the RequestType
objects, adding an equals method fixed the issue.
I'll close the issue.
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
Components: JSF
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
Assigned To: Pete Muir
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