Please check the MyFaces WIKI FAQ for more information on this
http://wiki.apache.org/myfaces/FAQ
Look for the question:
Select Items stop working in MyFaces 1.1.5
-Andrew
On 5/23/07, Andrew Robinson <[EMAIL PROTECTED]> wrote:
That is invalid code for the JSF specification (MyFaces <= 1.1.4 was
not JSF compliant in that respect).
Your item values are strings ("0", "1") not Long instances. You have
to either (1) use string in your backing bean, (2) use EL in the
itemValue to force the instantiation of numbers (though it would
probably create Integer not Long) or (3) write a custom select one
menu that has 1.1.4 behavior (search the mailing lists, I posted code
for that -- maybe I'll add it to the WIKI as this is definitely a FAQ)
-Andrew
On 5/22/07, Scott Fauerbach <[EMAIL PROTECTED]> wrote:
> I upgraded from MyFaces Core/Impl 1.1.4 to 1.1.5 and the property setter
> never gets called even though the form is submitted (I have a phase listener
> that was called plus you could tell the browser makes a request). I went
> back to the 1.1.4 and it worked fine. I'm using the standard selectOneMenu
> component, not a tomahawk component.
>
> JSF:
> <h:form>
> <h:selectOneMenu value="#{MyBean.myProp}" onchange="submit();">
> <f:selectItem itemLabel="Zero" itemValue="0"/>
> <f:selectItem itemLabel="One" itemValue="1"/>
> <f:selectItem itemLabel="Two" itemValue="2"/>
> <f:selectItem itemLabel="Three" itemValue="3"/>
> </h:selectOneMenu>
> </h:form>
>
> Managed Bean snippet:
>
> public void setMyProp(Long myProp) {
> this.myProp = myProp;
> }
>
> Any ideas?
>
> Scott Fauerbach
>
>