Guys,
 
I have code that used Integer objects with the h:selectOneRadio component and it worked well with MyFaces 1.0.9
 
the value parameter is of Integer type and every SelectItem passed to the component has it's value of Integer type also.
 
I switched to MyFaces 1.1.0 and the component does not show a initial value anymore.
Digging inside the code, I found that the HtmlRadioRendererBase always convert the SelectItem value to a String value, and issues a equals() call with the Integer value that was obtained by a ValueBinding reference.
It's obvious that String.equals(Integer) will always return false, and because of this issue, the component will never show the selected value.
 
I see that if I convert everything to String, it will work again.
 
Is there a reason for this to work this way? Should both value binding and the SelectItem values be converted for this comparison???
 
The code I'm talking about is on HtmlRadioRendererBase (lines 185 and 186).
 
Thanks in advance,
________________________________________
Eduardo Bastos Leite
Analista de Sistemas
QuickMind Tecnologia em Conhecimento
Tel.: +55 21 2524-2956 Ext. 215
Cel.: +55 21 9953-2223
 

Reply via email to