In struts 1.2, how can i highlight radio button according to my database value?I am using Form bean to set other text field values.
<tr>
<td align = "right" nowrap>SEX:</td>
<td align= "right" nowrap> <html:radio property="sex" value="male"/>MALE
<html:radio property="sex" value="female"/>FEMALE</td>
</tr>
I am using form bean an following java code:stuform.setSex((String)tempmap.get("SEX"));
here stuform is object of StudentForm class and tempmap contain data from select query.
You can use an if statement, I am using jstl if statement but you can use tag too.
<c:if test="${myForm.sex=='female'}">
<html:radio property="sex" value="female"/><span style="color: red;">FEMALE</span></td>
</c:if>