Hi Gunnar,
I was reading your doc on Seam Validation
http://docs.jboss.org/seam/3/validation/latest/reference/en-US/html_singl...
I was thinking that we might be able to go one step further with the "Dependency
injection for constraint validators".
Today you ask people to configure the ConstraintValidatorFactory using some XML snippet.
How about Seam transparently configure it.
You can do it programmatically at two levels:
1. during the construction of ValidatorFactory
ValidatorFactory factory = Validation
.byDefaultProvider().configure()
.constraintValidatorFactory( new InjectingConstraintValidatorFactory() )
.buildValidatorFactory();
2. or during the Validator construction
validator
.usingContext()
.constraintValidatorFactory( new InjectingConstraintValidatorFactory() )
.getValidator();
WDYT?