• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Bean validation custom messages dont work

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
First of all escuse me for my english. I have a problem with bean validation messages. I have ValidationMessages.properties, MessageResources.properties and in my .xhtml or in my ManagedBeans files i can access the keys... all is correct but when i put the


in my MessageResources bean Validations dont work well. This is my configuration:

faces-config.xml



The MessageResources



The .xhtml file



the property in my managedBean




the ValidationMessages.properties



Bean validation display my messages but not i this format javax.faces.validator.BeanValidator.MESSAGE={1}: {0}
where {1} is the label and {0} is the message. It only display the message with the key error.campoobligatorio=El campo es obligatorio

SOMEONE KNOWS WHY???
 
Saloon Keeper
Posts: 27807
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to the JavaRanch, Sr. Munoz! (¿Muñoz?)

I think your problem is:


Where it should be


The "#" triggers the EL processor.
 
reply
    Bookmark Topic Watch Topic
  • New Topic