Re: [appfuse-user] Struts validation

2010-12-19 Thread Ramzi MAALEJ
I have two files generated by Appfuse Sport-validation.xml, I put it in model package and the second one SportAction-validation i put in webapp.action.sport package which using visitor validator. I'm testing validation by simply running the application using mvn:jetty run-war, I get errors from

Re: [appfuse-user] Struts validation

2010-12-19 Thread Dustin Pearce
Interesting. I think the error you are getting from the DAO layer would be helpful. When you say the validation is not working, is the validation you want not firing or an exception is being thrown by a DAO? Or an exception is thrown because your validations are not firing? What does your a

Re: [appfuse-user] Struts validation

2010-12-19 Thread Ramzi MAALEJ
Let's say name is a mandatory field. When I try to save a sport with empty name, validation is not firing and the exception I got is from DAO layer saying that name cannot be empty. Normally validation should be fired before going to DAO layer, and this is not working in my case. My actions are

Re: [appfuse-user] Struts validation

2010-12-19 Thread Dustin Pearce
Barring some nasty syntax problem, it seems like the only things left are the path of your -validation.xml files and the validator type. The validator files should mirror your class package path. So in the case of your actions your -validation files should be in src/main/resources/com/xxx/weba

Re: [appfuse-user] Struts validation

2010-12-19 Thread Ramzi MAALEJ
Thank you for your help ! I get it working now, it was a path problem. The only remaining problem is : the error message is displayed twice. is there any configuration to prevent that. thank you again ! On 2010-12-19 13:08, Dustin Pearce wrote: Barring some nasty syntax problem, it seems like

Re: [appfuse-user] Struts validation

2010-12-19 Thread Dustin Pearce
That sounds a little nastier. The exact same validation message and exact same field name? Is the validation repeated in the action-validation and the model-valiation files? Multiple copies (honestly I don't think that works or if it did would fire twice, but who knows sometimes). What is th