Radio button validation problem
I'm having an issue... I have a data table. I have radio buttons in that data table. That radio is bound to a field in a backing bean, which is SET to "None" when the page loads, which should automatically set that radio with that value to CHECKED. When I submit the form, and try to come back to the page via a link, even though I have the field set to a value, it comes back with a validation error and thennone of the radio buttons are checked.
Can anyone help me?
- Tammy
[503 byte] By [
Tammy_Ea] at [2007-11-27 2:37:27]

# 2
The error is: actionType,summary=Validation Error: Value is not valid
There are 5 radio buttons per row.
I'm doing this:
<h:selectOneRadio value="#{varmyRecs.action}"
layout="lineDirection" id="actionType" styleClass="std">
<f:selectItems value="#{varmyRecs.actionTypes}" />
</h:selectOneRadio>
Both action and actionTypes are in my bean (data table is represented by list of beans.
In my bean I have a method getActionTypes() which returns:
return new SelectItem[] { new SelectItem(new String("1"), "Action 1"),
new SelectItem(new String("2"), "Action 2"),
new SelectItem(new String("3"), "Action 3"),
new SelectItem(new String("4"), "Action 4"),
new SelectItem(new String("5"), "None") };
I set the beans in the list to String "5" initially. But if I submit and come back, even though the bean is set correctly, the component on the page does not get set.
Ideas?
# 3
Hi,I changed the SelectItems from Strings to Integers, and now the default checkbox is checked, but I am getting "Conversion error occurred."Does that help you identify the problem?