I'm afraid that in the current Struts model, there are still quite a few things to juggle to get an ActionForm instance. At the bare minimum, you need an HttpServletRequest (and from it, a ModuleConfig and possibly the session) and two Strings.
I think it would be nice to make it very clear how to get an instance with out having to juggle all of these. It would be possible, for instance, to add a method to ActionContext (which encapsulates the request scope, the session scope, and the module config) which would take two String arguments and return an ActionForm. I think some would object to putting that much behavior in ActionContext, so an alternative would be to pick a Utils class (or maybe the ModuleConfig) and pass it the ActionContext and two strings.
If you're interested in the issue, though, let's continue the discussion on "dev" (thread subject: "ActionConfig property map and form setup strategies (Re: POJO Actions and the ActionCommand interface)")
Joe
At 2:50 PM -0500 3/17/05, Rick Reumann wrote:
Rick Reumann wrote the following on 3/17/2005 2:29 PM:
Convincing me that 'more' ActionForms are a good thing is going to be a difficult task, but restate or post your summary propostion and I'll 'attempt' to look at it without any preconceived notions that you might be crazy:)
Jack, I saw your post here on the dev list, and I believe I know the problem you are talking about. Yes, I have run into the annoying situation where you have a new form you need to set for the resulting page you will be forwarded to. I'd argue though that this isn't "that" common of occurrence and when it does occur I don't find it that big of a deal to just manually instantiate the form that I'll need (in the first action) and stuff it into scope so it's ready for the ensuing jsp to use. (I could be wrong, though, in understanding the situation you are concerned with.)
--
Joe Germuska [EMAIL PROTECTED] http://blog.germuska.com "Narrow minds are weapons made for mass destruction" -The Ex
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]