Hi,
I'm new to
JSF. I have a problem with radio buttons in jsf. After clicking on yes or no to a radio button, i will submit my form. After that when i reload the saved form from the data base, it is not retaining the value of the radio button. but after saving the form the values are avail in the db.
Based on this radio button value i have to show the subsections.
Here is my code...
<t:selectOneRadio id="rad1" value="#{formPage.form.details.prop1}"
<f:selectItem itemLabel="Yes" itemValue="Yes" />
<f:selectItem itemLabel="No" itemValue="No" />
</t:selectOneRadio>
public class XXX {
private Form1 form = null;
...
public XXX() {
eform = formObjectsFactory.createForm1();
}
}
public class Form1 {
private Details details = null;
...
public Form1() {
details = formObjectFactory.createDetails();
}
}
public Details {
private
String prop1= null;
...
}
And assume that remaining code what ever is needed here is all in place.
I know that we can do the same with javascript while loading the form. But in my form i have around 500 radio buttons are available. when we tried with javascript it is taking too much time to load the form with all the values and each and every radio button will have unique id.
Please advice me a solution for this.
Thanks in advance,
Kiran
[ October 16, 2008: Message edited by: kopparapu v kiran kumar ]
[ October 16, 2008: Message edited by: kopparapu v kiran kumar ]