views:

31

answers:

1

We have validation rules written in Drools at a backend. Rules are written against Domain model.

We would like to have rules at one place only. So we have created class which looks like:

    public class ModelItem<T> {

        private String userInput;
        private T value;
        ....
}

And we've extended converters so If conversion cannot be done then we store value in "userInput".

Is there any built-in way how to perform backend validations instead of default wicket validators?

Which concept do you use?

A: 

you can force wicket to user BeanValidation (JSR-303). I have not used this yet, but heard from others that it does well

http://carinae.net/2009/12/integration-of-jsr-303-bean-validation-standard-and-wicket-1-4/

nebenmir
Actually this it not what I'm looking for. We have done business validation in drools. So there are hundreds of rules. Cross checks, not null, "if user is 42 years old and has blue eyes then...."
Vitek