below... On Sun, 2006-04-30 at 17:47 -0500, Joe Germuska wrote: > On 4/30/06, Caroline Jen <[EMAIL PROTECTED]> wrote: > >I have seen some discussions on this forum regarding > >action chaining. Primarily, the advices are to think > >through the business logic before making decision on > >chaining actions. > > > >What are the disadvantages of action chaining? Why > >action chaining is not a good practice? > > http://wiki.apache.org/struts/ActionChaining > > As noted in that page, ActionChaining is using Struts in a way which > often works, but for which it was not specifically designed. It's > possible that you might run into some odd situations where the > assumption that a single HttpRequest results in only a single pass > through the RequestProcessor causes something to go wrong. > > I usually just refactor my app when I find myself wanting to use > action chaining, but many people just do it and find that it works. > > Joe
How do you handle the population of the contexts which are passed to the jsp to which you are forwarding? The one use of chaining that seems to make sense to me is the forwarding to a setup action that prepares the contexts with whatever objects the jsp may need to display. I have heard people say that this setup functionality should be moved to its own method in the business layer that could then be called by the forwarding action, but how does this actually look? The objects have to be put in a web tier context object, how do you keep that layer away from the business tier? Is there a reason you don't use the two action (setup and submit) approach? I'm in the process of learning webwork and while i'm at it i'm trying to decide on best practices for action architecture. Webwork makes the two action thing even easier, because you can specify a method to call on an action class in the action mapping, so the setup and submit handling methods can exist in the same action class. or you can even specify the method to call on an action class in the url using the ! character, as in /customer!setup.action. any advice or insight would be appreciated. dave --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]