I am using Sun JSF-RI 1.2 and having grief with h:SelectOneMenu. The value is bound to a backing bean field of type Object.
<h:selectOneMenu value="#{bean.currentNumber}">
<f:selectItems value="#{bean.numberList}" />
</h:selectOneMenu>
The SelectItems are created as follows:
SelectItem option = new SelectItem(new Double(3),"3");
I expect my backing bean to be injected with an object of type Double but instead all I get is a String "3"
I believe JSF should convert it correctly, other wise what is the point in having a
SelectItem(Object val,String label)
Constructor, if all its good for is strings
Please help !!!
Thanks :)