So this is how i solved it - basically preserving wickets functionality as
much as I could, and only changing it in the event i have a spring
validator.

on my AbstractForm i did the following:

    public void setSpringValidator(Validator validator) {
        this.validator = validator;
    }

    @Override
    public boolean process() {
        boolean processed = super.process();

        if (processed && validator != null) {
            Serializable target = (Serializable) getModelObject();
            try {
                // handles validation of object to validator
                ValidationUtils.validate(target,
target.getClass().getSimpleName(), validator);
            } catch (ValidationException ve) {
                markFormComponentsInvalid();
                visitFormComponents(new SpringValidatorErrorVisitor(ve));
                processed = false;
            }
        }

        return processed;
    }
-- 
View this message in context: 
http://www.nabble.com/IFormValidator---I-need-some-clarification-please-tp18481522p18501131.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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

Reply via email to