Hi everybody
I have managed to use a custom resource bundle when doing explicit validation like explained here:
http://musingsofaprogrammingaddict.blog ... chive.htmlI.e. if I do this:
Code:
ValidatorFactory validatorFactory = Validation.byProvider(HibernateValidator.class).configure().messageInterpolator(new ResourceBundleMessageInterpolator(myCustomResourceBundleLocator)).buildValidatorFactory();
Validator validator = validatorFactory.getValidator();
constraintViolations = validator.validate(myObj, Default.class);
It works as expected. But, we're not doing explicit validation, this is being performed by both our JSF framework (mojarra) in the frontend, and JPA in the backend (Hibernate). How can I configure these to use our custom resource bundle?
And another thing.. Where does the locale that is passed as a parameter to my resource bundle come from?
All help would be greatly appreciated!
Regards, Anders