Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

<h:selectOneRadio default value issue

843842Apr 25 2005 — edited Jun 19 2008
Hi,

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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 17 2008
Added on Apr 25 2005
11 comments
2,406 views