Sunday, January 5, 2014

Re: Custom MessageInterpolator for Validation ?

Hello.



> As you provide different i18n message bundles for each place / view I'm
> trying to provide different ValidationMessagesResolvers. But this seems to
> be quite difficult.
> You define a custom ValidatorFactory derived from
> AbstractGwtValidatorFactory and a ValidationMessagesResolver in the module
> xml. But GWT always creates a UserValidationMessagesResolver in
> GwtMessageInterpolator, which gets created in turn in
> AbstractGwtValidatorFactory#init(). But this init method is final...

Would this help?

http://stackoverflow.com/questions/14031803/gwt-validation-framework-how-to-
specify-location-of-internationalization-bundle



Or if you understand french (or just glance at the code, or use Google
Translate :)), http://blog.developpez.com/karbos/p11535/recettes-de-code/la-
validation-des-donnees-avec-gwt-2-5-cote-client
explains how to customize
constraints messages too.



Best regards


Nicolas

No comments:

Post a Comment