<h:selectOneRadio default value issue
843842Apr 25 2005 — edited Jun 19 2008Hi,
I am using radio button a follows -
<h:selectOneRadio id="myRadio" value="#{bean_testAnnuity.a_option}" >
<f:selectItem itemValue="1" itemLabel="Yes"/>
<f:selectItem itemValue="0" itemLabel="No"/>
</h:selectOneRadio>
where a_option value in backend bean has no initial value.
Now when on UI page , I do not click any of the options of above radio button and click on any submit button then I get an error that
"Validation error : value is not valid".
This works fine if I specify select any radio button option or specify 0 or 1 as initial value for property in bean.
My client requirement is that if user does not selects any option it should work fine.
Is there any way to avaoid this validation error.
best regards,
cs_mits