i can't seem to find an answer for this on the user's forum. I hope some of you can bring some light.
Form Bean:
private boolean[] check = {true, true}; /** * @return */ public boolean[] getCheck() { return check; }
/** * @param bs */ public void setCheck(boolean[] bs) { check = bs; }
public void reset(ActionMapping mapping, HttpServletRequest request) { for(int i=0; i<check.length; i++) check[i] = false;
}
JSP:
<html:checkbox property="check[0]"/> <html:checkbox property="check[1]"/>
Problem: both checkbox are not checked when the page first loaded. Any idea on how to get them checked when the page first starts up?
Thanks,
Log in to post a comment.
i can't seem to find an answer for this on the user's forum. I hope some of you can bring some light.
Form Bean:
private boolean[] check = {true, true};
/**
* @return
*/
public boolean[] getCheck() {
return check;
}
/**
* @param bs
*/
public void setCheck(boolean[] bs) {
check = bs;
}
public void reset(ActionMapping mapping, HttpServletRequest request) {
for(int i=0; i<check.length; i++)
check[i] = false;
}
JSP:
<html:checkbox property="check[0]"/>
<html:checkbox property="check[1]"/>
Problem:
both checkbox are not checked when the page first loaded. Any idea on how to get them checked when the page first starts up?
Thanks,