OK, it works now. Not perfectly, but it works. Actually I had to name my validation file CreerDmandeAbsenceAction-submitCreerDemandeAbsence-validation.xml, beginning with an uppercase letter. Then I put this file in my action package as you said. But it worked only when I set the validate attribute of my form to true in the JSP ... When I set this attribute to false, the validation doesn't work at all. Maybe it's because I use Ajax theme ? But I still have problems, when i submit my form : - I have a Javascript popup for each datetimepicker in my form (message : "TypeError: row.cells has no properties") - There is no validation on radio buttons ... - When I submit my form a second time, the errors list is not reseted, so the remaining errors are displayed twice ... - The label for required fields turns to red ... but only for text fields and selects, but not for datetimepickers, radio buttons or textareas ...
Moreover, is there a way to group the error messages on top of the form, and not besides each field (I know it was the default behaviour with Struts 1 but can't find how to do it with Struts 2). Thanks for your help ;) Olivier 2007/5/9, Guillaume Carré <[EMAIL PROTECTED]>:
2007/5/9, Olivier THIERRY <[EMAIL PROTECTED]>: > Well, it still doesn't work :( > A few questions : > - Do I have to put the xxx-validation.xml files in a specific directory ? I > put them in the WEB-INF/classes directory ... you have to put it in the same package than your action > - And has the first part of the validation xml file to be the action name > (name attribute in struts.xml file) or the action class name ? I didn't find > it clear in the documentation ... your validation file needs to have the following name: ActionName-alias-validation.xml in your example: creerDemandeAbsenceAction-submitCreerDemandeAbsence-validation.xml -- Guillaume Carré --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]