This is about the classic Inability to uncheck checkboxes with DAF.

I know I must overide reset() but I can't get anything to both keep session
state AND allow all boxes unchecked.

I tried the code below, obviously this isn't allowing session persistence
because the request param is being checked, but other approaches with
DAF.get(props[i].getName()) won't work either becuase the population occurs
after the reset method.

Please help me someone!

        public void reset(ActionMapping mapping,HttpServletRequest request) {

                //initialize(mapping);

                String name = mapping.getName();
        if (name == null) {
            return;
        }
        FormBeanConfig config =
            mapping.getModuleConfig().findFormBeanConfig(name);
        if (config == null) {
            return;
        }
        FormPropertyConfig[] props = config.findFormPropertyConfigs();
        for (int i = 0; i < props.length; i++) {
                if (props[i] instanceof CondResetFormPropertyConfig &&
                (((CondResetFormPropertyConfig)props[i]).getReset())) {

                        if(request.getParameter(props[i].getName()) == null) {
                                set(props[i].getName(), props[i].initial());
                        }

                }

        }
        }


TIA
--
Mike W


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

Reply via email to