Frank W. Zammetti wrote the following on 3/17/2005 6:35 PM:

* I could "chain" Actions, i.e., forward to an Action instead of immediately to the second pages' JSP, that is specifically designed to get the values for that dropdown. Aside from the overhead of the extra pass through the entire framework, it's a kludge anyway.

I totally disagree that the above is a hack or kludge.

First off, if you are using Struts you are always going through a controller, even if the basic FowardAction, so even when you say you are going "immediately" to another page you are still going through a controller.

Second, the next page obviously has a form on it and that form will submit to an Action. So why is it such a big deal to have a setUp dispatch method there? And once you have that setUp method in there (which sets up your drop downs), it's just a matter of fowarding to this action and giving it the dispatch setUp parameter.

I'm actually suprised you guys think this is such a big deal. The situation C that I brought up a couple posts back is much more of annoying problem and I thought that's what you were talking about.

Sure you can make it more eloquent by using the chain stuff, or even the cool idea you came up with Frank, to setup what you need, but I wouldn't see this is a "big problem" as Jack put it. Actually, Jack, your initial post mentions:

"I am surprised if it is not an important point for all of us."

I for one, don't see this as that important in grand scheme of things. I think the apps I'm stuck to work on are pretty complex, but even the most basic struts developer can follow the concepts very easily:

Pages submit to DispatchAction methods. Most actions have a prep method (setUp concept) used to set up the request (or the form) with any necessary items. If you need to get to page that needs something preped/setup then simply make sure you go through the appropriate DispatchAction prep method. Are there more flexible solutions out there? I'm sure there are. The above has been working fine for me though.

--
Rick

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to