aspose file tools*
The moose likes Struts and the fly likes Struts validations not kicking in Multi-Language application Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts validations not kicking in Multi-Language application" Watch "Struts validations not kicking in Multi-Language application" New topic
Author

Struts validations not kicking in Multi-Language application

Angelo Bonaparte
Greenhorn

Joined: Aug 02, 2006
Posts: 19
Hi, I have some DynaActionForms wth some validations defined in the struts-config.xml. My system is in English and French. The validations used to work whether I was in french or english but all of a sudden they validate only in the english language. I was just wondering where was the best place to look. Thanks.
Angelo Bonaparte
Greenhorn

Joined: Aug 02, 2006
Posts: 19
Well, I did a bit of debugging stepping thru Struts code and i've noticed that at startup the forms are set in in a form set within the ValidatorResources Object. Two lists are created, one for en_CA and one for fr instead of fr_CA? Possibly a problem. When I look at the lists the en_CA which is my default local it has all of my forms but the fr only has one. Does anybody have any idea why the validator plugin only puts the forms in the english en_CA list?
[ March 14, 2007: Message edited by: Angelo Bonaparte ]
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
I've never used the Struts Validation Framework in a multi-language environment, but as I read the Struts Validator Guide I get the impression that you have to create a separate formSet for each locale in your validation.xml file. Try creating two formSets like this:


Merrill
Consultant, Sima Solutions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Struts validations not kicking in Multi-Language application