aspose file tools*
The moose likes Struts and the fly likes @RequiredFieldValidator & i18n Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "@RequiredFieldValidator & i18n" Watch "@RequiredFieldValidator & i18n" New topic
Author

@RequiredFieldValidator & i18n

E Robb
Ranch Hand

Joined: Aug 27, 2010
Posts: 111
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

Joined: Aug 27, 2010
Posts: 111
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.


 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: @RequiredFieldValidator & i18n