Hi,

I have a class and an action and a form,
I am trying to check one of the two checkboxes and submit and
display the selected checkbox value.


The following code is in my form:

public final class TestForm extends ActionForm  {

    private String chkVal = "on";
    private boolean isBillable = false;

    public String getChkVal()
    {
        return (this.chkVal);
    }

    public void setChkVal(String _chkVal)
    {
        this.chkVal = _chkVal;
    }

    public boolean getIsBillable()
    {
        return isBillable;
    }

    public void setIsBillable(boolean billed)
    {
        isBillable = billed;
    }

    public void reset(ActionMapping mapping, HttpServletRequest request)
    {
        isBillable=false;
    }
}


The test.jsp has the following code:

<html:html>
    <head>
    <title>
      <bean:message key="welcome.title"/>
    </title>
    <html:base/>
    </head>
    <body>
        <html:errors/>
        <html:form action="/test">
            <html:checkbox property="isBillable" value="chkVal"/>
            <html:submit>
                <bean:message key="button.display"/>
            </html:submit>
       </html:form>
   </body>
</html:html>



When I click on the button to submit the form, I tried to display the
attributes of the checkbox and they are still
isBillable=false
value="on"


Does anybody know how to fix?
Or anybody knows a detailed html:checkbox with struts detailed example
to point me to it?


Thanks,,,

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to