Hi guys,
Have started using
Struts recently. I have a small problem with <html:checkbox />. In the
JSp whether I check the box or not the value of the checkbox is appearing as "on" in the Action class. I haev a getter, setter method too for this control and am resetting the property to null also. But still I am getting the same prob. Can some help me in correcting my mistake?
The code -
---------------------------
<html:checkbox property="chkItem" value="Y" /> etc etc
<!-- Have tried removing the value attribute too, but of no use---->
-----Action form--------
private
String strChkItem;
public String getChkItem()
{
return strChkItem;
}
public void setChkItem(String strTmp)
{
this.strChkItem = strTmp;
}
public void reset()
{
strChkItem = null;
}
-------------------------------
THanks in advance,
Kash