How to make the radio button selected by default on page load
I am fetching some records from DB and storing that in bean and populating radio button values using
<
jsp:useBean id="sel" class="myTest.struts.bean.ViewForm" />
<html:radio property="select" value="<%= bean.getName()%>" ></html:radio>
I am putting the value of first name in an hidded variable called 'val'
i referes the index of first record.
this is my Form class
import org.apache.struts.action.*;
public class ViewForm {
private
String select="selvi";
}
public void setSelect(String s)
{
this.select=s;
}
public String getSelect()
{
return select;
}
}
when I am loading the JSP radio button corresponds to first record "selvi" is not getting selected.
pls help me to solve this..