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

atao do-not-reply at jboss.com
Thu Sep 14 11:01:37 EDT 2006


Hello,

I'm trying to add i18n messages to booking example, something like:

   @NotNull(message="#{messages['booking.credit.card.not.null']}")                           
   @Length(min=16, max=16, message="#{messages['booking.credit.card.number.wrong.length']}")          
   @Pattern(regex="^\\d*$", message="#{messages['booking.credit.card.number.invalid']}")           
   public String getCreditCard()
   {
      return creditCard;
   }

It's work fine when I work with a navigator. But during the test, BookingTest.renderResponse fails. The string returned by
    ( (FacesMessage) messages.next() ).getSummary()
is
   #{messages['booking.credit.card.not.null']}
and not the pattern associated with the key "booking.credit.card.not.null".

Is it the expected behavior?


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3971582#3971582

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3971582



More information about the jboss-user mailing list