[jboss-user] [JBoss Seam] - Re: i18n validation message during test

2006-11-26 Thread rlhr
Hello,

I tried to setup custom messages for the hibernate validation annotation but 
without success yet.

I have a ValidatorMessages.properties (defining all the default message for 
hibernate validators) file in my ear file so that I don't get an exception at 
server startup.
All my properties file are under WEB-INF/classes in the war file.
In compoments.xml, I define all these files and everything works fine except 
validations still return the default Validation Error message.

I also tried to define the following in the faces-config.xml:

message-bundleValidatorMessages/message-bundle 
  | 
  | locale-config
  | default-localeen/default-locale
  | supported-localeen/supported-locale
  | supported-localefr/supported-locale
  | /locale-config
  | 
But it didn't change anything...

I tried to use both syntax:


  | @NotNull(message={validator.my.message})
  |  and 
  | @NotNull(message=#{messages['validator.my.message']})
  | 

Without much success.

Does anyone know how to set this up? I'm sure I must have missed something 
somewhere, but I can't see what.

Thanks,

Richard 

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=3988629#3988629

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3988629
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: i18n validation message during test

2006-11-26 Thread atao
Richard

read the thread

http://www.jboss.com/index.html?module=bbop=viewtopict=93507

to get some more explanations about NotNull annotation and validation tag.

Pierre

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=3988670#3988670

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3988670
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: i18n validation message during test

2006-11-26 Thread rlhr
Hi Pierre, 

Thanks for the link, I'm going to take a look at it.

Richard

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=3988685#3988685

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3988685
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: i18n validation message during test

2006-09-14 Thread [EMAIL PROTECTED]
Yes, Hibernate Validator wants you to use:

 @NotNull(message={booking.credit.card.not.null}) 


However, Emmanuel and I are currently working on some integration b/w Seam and 
Hibernate Validator so that you can use #{messages['...']} for consistency.

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=3971600#3971600

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3971600
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: i18n validation message during test

2006-09-14 Thread atao
ATM, in a deploiement under jBoss server, 

 @NotNull(message=#{messages['booking.credit.card.not.null']}) 

works with messages_loc.properties under 
{booking_home}/resources/WEB-INF/classes

and

 @NotNull(message={booking.credit.card.not.null})

doesn't work even with ValidatorMessages_loc.properties under 
{booking_home}/resources/WEB-INF/classes. 

I don't see what is wrong!

Pierre

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=3971649#3971649

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3971649
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: i18n validation message during test

2006-09-14 Thread [EMAIL PROTECTED]
Oh, I'm wrong,  #{messages['booking.credit.card.not.null']} does work after all.


View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=3971660#3971660

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3971660
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: i18n validation message during test

2006-09-14 Thread atao
Ok

So I come back to my first question: I get the literal string 

#{message['any.key']}

and not the associated pattern  when I test BookingTest.renderResponse

is it the expected behavior?



View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=3971664#3971664

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3971664
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: i18n validation message during test

2006-09-14 Thread [EMAIL PROTECTED]
message!=messages

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=3971680#3971680

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3971680
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: i18n validation message during test

2006-09-14 Thread atao
Oups! Sorry, the mistake is only here. The code is really like:

   @Length(min=16, max=16, 
message=#{messages['booking.credit.card.number.wrong.length']})  

and during test, ( (FacesMessage) messages.next() ).getSummary() returns

#{messages['booking.credit.card.number.wrong.length']}

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=3971770#3971770

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3971770
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user