Thanks Rick,

From what I have read so far it seems that Struts requires you to know quite
a few "work-arounds" in order to get it to do what you want.

In fact, while I feel I have gained a pretty good idea of the Struts architecture and all the different ways of doing things, I still feel like I have a mountain ahead of me to learn all the necessary tips and tricks to do any serious development with it...

Lawrie.

From: Rick Reumann <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <user@struts.apache.org>
To: Struts Users Mailing List <user@struts.apache.org>
Subject: Re: Wouldn't validation be better performed by Actions rather than ActionForms?
Date: Fri, 18 Mar 2005 14:16:21 -0500


Lawrie Gallardo wrote the following on 3/18/2005 12:17 PM:

Now if this is the case, would it not be better to have the ActionForm as basically a dum data holder and have the validation method in the Action classes instead? The strus-config.xml file could contain all the required declarative validation, transformation and mapping info, and the Action class could contain any validation, transformation, and mapping operations that were too complicated to be set up declaratively.

I agree totally and I call my validation from my Action classes. Example here (at the end) http://reumann.net/struts/articles/request_lists.jsp


(Note in that example, I call the form's validate method from my Action, but I only do that in the example to show that it can be done and to keep it simple. In practice I think it's much better to not even do the validation in the ActionForm's validate method - even if you are just invoking that method from elsewhere.)

--
Rick

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


_________________________________________________________________
It's fast, it's easy and it's free. Get MSN Messenger today! http://www.msn.co.uk/messenger



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to