webtier@glassfish.java.net

Re: [webtier] Bean validation localization issue

From: Ed Burns <Ed.Burns_at_Sun.COM>
Date: Wed, 21 Oct 2009 13:16:53 -0700

>>>>> On Tue, 20 Oct 2009 03:30:49 -0700 (PDT), webtier_at_javadesktop.org said:

SH> I tested integration of a snapshot from last week with Hibernate
SH> Validator 4.0.0.GA. I just added the parameter
SH> INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL to integrate it. The
SH> validation works fine but there is an issue with the selected
SH> messages.

Please note that the only JSR-303 implementation supported by Glassfish,
and thus Mojarra, is the specially produced OSGi bundle mentioned at
[1]. This implementation is exactly the JBoss JSR-303 RI plus some code
to make sure EE6 guarantees are met. If you are trying to use a
Hibernate Validator build inside of Glassfish, you're on your own and we
can't help you on this forum. In that case, I can refer you to the
Hibernate Jira at [2]. Please confirm that you are using the supported
stack.

SH> I have a default language of en and a support language of de. My
SH> system language is de_DE. The default
SH> ResourceBundleMessageInterpolator cannot find the english default
SH> messages as they are stored in a file without _en suffix and falls
SH> back to a german bundle. Though the users locale and the locale
SH> passed to the interpolator was English.

I understand what you are trying to do. I think this will reproduce
your scenario.

I have a default language of de and a supported language of en. My
system language is en_US. The default ResourceBundleMessageInterpolator
cannot find the German default messages as they are stored in a file
without the _de suffix and falls back to the English bundle, though the
user's locale, and the locale passed to the interpolator is German.

If I set my system up like that, does that accurately replicate your
problem?

Thanks.

Ed

[1] http://wiki.glassfish.java.net/Wiki.jsp?page=V3Jsr303BeanValidationIntegration

[2] http://opensource.atlassian.com/projects/hibernate/

-- 
| ed.burns_at_sun.com  | office: 408 884 9519 OR x31640
| homepage:         | http://ridingthecrest.com/