I'm having problems getting a correct form submittal with a simple
selectOneMenu in the latest MyFaces and TomaHawk.
After issuing the command button, I'm getting "Validation Error
"statusid": Value is not a valid option."
The statusid is an Integer value on the backing bean.
In previous versions (1.1.1) this works fine. Doesn't MyFaces/Tomahawk
in later versions autoconvert strings to integers where appropriate?
My form looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:t="http://myfaces.apache.org/tomahawk"
xmlns:acegijsf="http://sourceforge.net/projects/jsf-comp/acegijsf"
xml:lang="en" lang="en">
<body>
<f:view>
<h:form>
<h:messages globalOnly="false" showDetail="true"
showSummary="true"/>
<h:selectOneMenu id="statusid"
value="#{testBean.statusid}"
styleClass="inputfield_long">
<f:selectItem itemValue="0"
itemLabel="Test1" />
<f:selectItem itemValue="1"
itemLabel="Test2" />
<f:selectItem itemValue="2"
itemLabel="Test3" />
<f:selectItem itemValue="3"
itemLabel="Test4" />
</h:selectOneMenu>
<h:commandButton />
<h:outputText value="#{testBean.statusid}"></h:outputText>
</h:form>
</f:view>
</body>
</html>