Truly an excellent answer from both of you guys. It helped me recognize validation goes down to method level and I learned about the wildcard methods.
In my example case, I will keep the two forms in one class. For future development i will create more classes as I like this approach more Cheers On Tue, Apr 19, 2011 at 4:26 PM, <stanl...@gmail.com> wrote: > Great answer Eric! I would also add that using wildcard methods for the > express purpose of minimizing the number of actions you have is bad > medicine. I'm not suggesting you are, but I have seen this on client > projects where they were more interested in check-in/check-out of a single > action than they were in doing the right thing. > > Peace, > Scott > > On Tue, Apr 19, 2011 at 9:17 AM, Eric Lentz <eric.le...@sherwin.com> wrote: > >> > I am asking because it seems that validation is only allowed for one >> > set of properties. This indicates I should create two actions >> >> Validation can go down to the method level and you can validate what you >> desire for that method call. Just name the .xml file (if using that >> approach) with the method name as well the class name. >> >> I would personally allow my decision on number of classes to be driven >> based on class purpose. I try to limit classes to a finite set of >> responsibilities, usually very fine-grained, in favor or more classes. >> This provides easier reuse, unit testing, etc. When classes get to be big >> and multi-purpose, then they get confusing and ripe for refactoring. >> >> If you feel you have a single purpose that a single class should address, >> then use the one class. If you are serving multiple purposes that aren't >> related (doesn't sound like your case), then don't worry about having just >> a couple lines in a class. It is okay to have lots of classes. > -- http://www.grobmeier.de --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org