If you store Domain objects as attributes in a Form object is there a problem with having methods in the form object to get the domain objects and have them execute some method?
public class FormObject extends ActionForm { DomainObject1 domain1 = new DomaniObject1(); DomainObject2 domain2 = new DomaniObject2(); } public FormObject { super(); } private void doSomething( String name ) { domain1.dosomething(name); domain2.doSomething(name); } We are currently looking at using the Command pattern with our Action Classes. The action class would instantiate a command class based on the command argument passed in the request object. The Action Class would then call the Command objects execute() which would execute the appropriate method in the form. The form would get the appropriate domain objects and execute the method to complete the task. My questions are: Does this violate the purpose of the Struts Framework? Does this violate MVC principles? Is there a cleaner way than the Command pattern? We currently have a large if statement which calls methods in the Action Class and are trying to get away from this. -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>