I need to conditionally set a checkbox field when presented to the user
depending on application configuration settings.  I'm using an Action to
load the form and attempt to set the checkbox field.  No matter what I
do I cannot get the checkbox state to change from its default, whether
that be true, false or no value (shows false). 

I've Google'ed, searched the list archive and various FAQ's to no avail.



In my ValidatorForm bean:  (This particular field is not validated)

    private boolean shutoff;

    public boolean getShutoff () {
        return shutoff;
    }

    public void setShutoff (boolean shutoff) {
        this.shutoff = shutoff;
    }

    public void reset(ActionMapping mapping, HttpServletRequest request)
{
        this.shutoff = boolean.FALSE;
    }

In my Action:

    if (checkTheBox.equals("yes")) {  //config. option, confirmed
working
        regForm.setShutoff(true);
    }

    [Then it immediately forwards to the form JSP.]



I also tried setting the value of the checkbox via another property in
the form bean.

I appreciate any corrections or suggestions.

Greg



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

Reply via email to