Are you using the validator framework? If you are, you can associate different validation rules with different actions for the same form (use DynaValidatorActionForm). Have a look at the documentation - it'll explain how to set it up.
D -----Original Message----- From: Chan, Jim [mailto:[EMAIL PROTECTED] Sent: 19 March 2004 17:42 To: 'Struts Users Mailing List' Subject: Can coarse grained ActionForms validate? Hi, I am using coarse grained action forms that are re-used by various action classes. Each of these action classes serve a different page and retrieves information from the backend so that the jsp page can show it. Now because I am using coarse grained forms, I have now way of knowing which fields to validate because the same form serve multiple actions. Also, if I use the ActionForm class to validate the client data, the ActionForm has to be responsible for re-initializing that page with backend information if validation fails. Therefore, even if I change to very fine-grained DynaForms and use the validation framework so that each action maps to one form, I will probably have to figure some way of fetching backend information if validation fails. Currently, I am doing all the client input validation in the action classes because it seems to be the most simple solution; however, it has the caveat that the action class is now responsible for both validation and backend service delegation. I am just wondering if there is a more elegant solution using the action forms as the validator. Any help is greatly appreciated. This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]