Originally posted by Julie Desuza:
I can have 5 separate Action Form Beans (one for each form), having only getXXX() and setXXX() without implementing any business logic.
Yes, you can have 5 diferent form beans, one per page, but i didn`t understand about what you said with "business logic". The only place
you should implement some
weak business logic in Action Forms is in the validate method.
Originally posted by Julie Desuza:
I can have only single Action Form Bean for all the 5 forms.
Wel, if your 5 forms contains the same field, you can map the 5 jsps to use the same form (in struts-config.xml).
Originally posted by Julie Desuza:
If my one form contains 3 different actions such as Send / Cancel / Reset then I will have three action classes (One action class per each action). Every action class will have an execute() , which will return me an object of ActionForward class.
This is
not a good strategies. It`s usual to build actions that encapsulates some basic functionality, for example, the CURD (create, update, retrieve and delete) operations of some specific funcionality should be placed in the same Action using methods name create, update, retrieve and delet. The same applies to the example you mentioned, Send, Cancel, and Reset should be placed in the same action because they actually deal with the same data.
The best way to do that is using DispatchAction and LookupDispatchAction with any other needs your application requires. An example of LookupDispatchAction follows
here [ September 06, 2004: Message edited by: Leandro Melo ]