I think I have found bug in either the JSF RI or MyFaces 1.0.9 concerning the selectOneMenu tag. My problem is that ever since I upgraded to 1.0.9 my selectOneMenu's haven't been defaulting to their correct values based on the value="" attribute, even though I know that they are getting the correct value.

The below code is a very basic page that has a <x:selectOneMenu> that should get it's value from my UserCtl.curUsr.costgroupuiddefault. I added an <h:outputText> tag so I could see what value was being return to the selectOneMenu's value attribute.

I am now thinking that my jump to MyFaces 1.0.9 is causing conflicts of some sort but I don't know where, how or why. Does anybody have input for me, or does anybody else see what I am seeing?


<%@ taglib uri="http://java.sun.com/jsf/html"; prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core"; prefix="f" %>
<%@ taglib uri="http://myfaces.apache.org/extensions"; prefix="x"%>
<f:view> <h:form>
<h:outputText value="#{UserCtl.curUsr.costgroupuiddefault}" styleClass="copy"/> <x:selectOneMenu id="costgroup" value="#{UserCtl.curUsr.costgroupuiddefault}">
<f:selectItems value="#{GroupCtl.costSOM}" />
</x:selectOneMenu>


<h:commandButton value="SAVE" action="#{UserCtl.updateUser}" styleClass="button"/>
<h:commandButton value="CANCEL" action="cancel" immediate="true" styleClass="button"/>


</h:form>
</f:view>


This is the output produced by the above code. As you can see the outputText is sending "17" to the browser, but I am always having the "--select--" displayed.
...
<span class="copy">17</span> <select id="_id1:costgroup" name="_id1:costgroup" size="1"> <option value="0">--select--</option> <option value="17">LAW - AU - 001</option> <option value="18">LAW - CG - 001</option> <option value="19">LAW - CG - 002</option>
</select> ...

Reply via email to