-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: provide a getMessage(Locale) for InvalidConstraint?
PostPosted: Wed Oct 01, 2008 2:12 pm 
Newbie

Joined: Fri May 26, 2006 6:07 am
Posts: 5
i understand there is a MessageResolver interface. but would it be simpler to the API users if there is a getMessage method that takes a locale like
InvalidConstraint.getMessage( Locale )?

In web application we typically needs to support i18N invalid message.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 01, 2008 2:38 pm 
Newbie

Joined: Fri May 26, 2006 6:07 am
Posts: 5
after looked a JSR 330 implementation (agimatec) in details, it seems a InvalidConstraint is intended to hold an error message for a particular language. it doesn't make sense to hold every language at all. Please disregard my previous suggestion.

Given the MessageResolver is an interface, it means we either have to implement it ourselves or to rely on a provider's implementation. Neither case is good IMHO.

To my understanding, there is no official way to bootstrap a Validator yet. When there is one, please consider to provide an interface to easily create a Validator with a Locale parameter that create a MessageResolver of a particular locale.

Thank you for reading.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 02, 2008 11:22 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
Being able to define a local in on my todo list.
The bootstrap API is described here. Have a look!

_________________
Emmanuel


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.