[bv-dev] Bean Validation 1.1 early draft 1 is out
Hardy Ferentschik
hardy at hibernate.org
Mon Jun 25 09:17:30 EDT 2012
Ok, I see the difference now. Your proposal goes away completely from bundles of messages and just takes a single message into consideration. Sure that works as well.
What is in your opinion the big gain of MessageResolver over ResourceBundleLocator? Obviously a resource bundle does not have to be backed by a properties file, but you could
return any custom bundle subclass you like. Are bundles not the general way i18n is approached in Java? It seems natural to "bundle" your custom validation messages per locale, or not?
--Hardy
On Jun 24, 2012, at 1:40 PM, Gerhard Petracek wrote:
> hi hardy,
>
> maybe it isn't that obvious since a ResourceBundleLocator isn't only about resource-bundles - see [1] and [2] -> i don't agree that it's a better name (since it's something slightly different).
> if we can't agree on MessageResolver, i would suggest MessageSource (similar to [3]).
>
> regards,
> gerhard
>
> [1] https://svn.apache.org/repos/asf/myfaces/extensions/validator/trunk/core/src/main/java/org/apache/myfaces/extensions/validator/core/validation/message/resolver/MessageResolver.java
> [2] https://svn.apache.org/repos/asf/myfaces/extensions/cdi/tags/extcdi-1.0.5/jse-modules/message-module/api/src/main/java/org/apache/myfaces/extensions/cdi/message/api/MessageResolver.java
> [3] http://static.springsource.org/spring/docs/3.1.x/javadoc-api/org/springframework/context/MessageSource.html
More information about the beanvalidation-dev
mailing list