what do you guys think of adding somekind of way to specify what the validation method to use in the validation interceptor?

right now it just uses validate() and is called on every action, but sometimes not all actions use that same validate method, so what i'd like to do is convert a action method like so:

    public String create() {
        // check for errors and add them in they exist

        if (!hasErrors()) {
            baseService.save(user);
        } else {
            return INPUT;
        }
        return SUCCESS;
    }
to:
        public void validateCreate() {
                // check for errors and add them in they exist
        }

        public String create() {
                baseService.save(user);
                return SUCCESS;
        }

benefit is that i dont need to check for errors in my methods, the validation interceptor will just send me back to INPUT if errors are in the action.

any input?




------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/ _______________________________________________ Opensymphony-webwork mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork

Reply via email to