<html:radio> Check radio button default in struts html tag
Asked Answered
I

1

7

How to set radio button checked by default in struts html tag ?

<html:radio name="RegisterForm" property="Group"  value="<%=Contant.Male%>"/><label>Male</label><BR>
<html:radio name="RegisterForm" property="Group" value="<%=Contant.Female%>"/><label>Female</label>

Here, i have to set Male as default one. Thanks in advance.

Implacable answered 9/1, 2013 at 14:43 Comment(0)
A
7

Just make sue that your controller sets the corresponding property in the form before dispatching to the view:

form.setGroup(Constant.Male);
Aggrieve answered 9/1, 2013 at 15:16 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.