You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by AMIR-TAHMASSEB Marc <MA...@cus-strasbourg.net> on 2003/04/08 16:12:57 UTC

html:radio can not pre-check

hi everybody, 
i have a radio button and want to pre-check when i display the page but nothing happens...
here is my code... (i didn't find any answer in the web :-( ). 
I hope that some one can help...
thanks,
 
Marc
 
my form :
public class MyForm extends ActionForm {
    private String level;
    
    public MyForm() {
    }
 
    public void setLevel(String level) {
        this.level=level;   
    }
 
    public String getLevel() {
        return level;
    }
}
 
my jsp :
...
<%
MyForm myForm = new MyForm();
myForm.setLevel("1");
%>
...
<html:html>
<html:form action="myAction.do" name="myForm" type="MyForm">
...
  <html:radio property="level" value="1">Level 1</html:radio>
  <html:radio property="level" value="2">Level 2</html:radio>
...
</html:form>
</html:html>