• 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

@RequiredFieldValidator & i18n

 
Ranch Hand
Posts: 111
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a simple required field validator in an action and it validates the field as it should. I cant figure out how to get i18n messages returned through.

properties file contains:
username.requiredString = User Name is a required field.

Action has:


When I do action validation "username.requiredString" is returned as the error message from the properties file. I have also tried OGNL in the message=%{username.requiredString} but a literal is always returned instead of the string from the properties file. I bet I have tried this 8 different ways and I cant get the message from the properties file.

If I use XML validation the string from the properties file comes back fine.

Ideas?

Earl
 
E Robb
Ranch Hand
Posts: 111
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I was able to get this working by removing the message and adding a key. The key is then pulled from the properties file as I would expect. This seems to work fine.


 
reply
    Bookmark Topic Watch Topic
  • New Topic