I am with Joe on this one. This situation is, at least for me, the most common situation I face. Every page except the welcome page has input for me. And, I have to redirect the welcome page because I need data there too. I bet if you looked at the posts to the users list seriatim you would find that a very surprising percentage of posts would center on this problem. I know that it can be solved programmatically, Rick, but think that this is something the framework should do.
I agree that ActionForms should be associated with page forms. That is why I think this should happen. Jack http://wiki.apache.org/struts/StrutsMultipleActionForms On Thu, 17 Mar 2005 15:05:28 -0600, Joe Germuska <[EMAIL PROTECTED]> wrote: > I find this a quite common experience, and I just posted a response > to Jack on the dev list outlining the direction I intend to take to > provide a solution. Also, as noted on the dev list, now that Struts > 1.3 allows you to easily configure arbitrary String properties on > ActionMapping (ActionConfig) means that it should be relatively > straightforward to add properties like "responseform.name" and > "responseform.scope" and do whatever you want with them. > > 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] > > -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]