On Thu, 16 Sep 2004 21:19:03 -0700, Michael McGrady <[EMAIL PROTECTED]> wrote: > > > Martin Cooper wrote: > > >IMHO, dispatch actions, whatever flavour, are a bad idea in the first > >place. They are essentially second-level controllers. What for? You > >already have a perfectly good controller in the Struts ActionServlet, > >so why have your own additional levels of controller below that? It > >only complicates the mechanism by which an incoming request is handed > >off to the relevant body of code, and confuses people trying to > >understand how the application works. > > > > > The problem that dispatch actions are primarily related to, Martin, is > determining which submit or image type was pressed when a form is > submitted.
This is condescending. I know what dispatch actions are for, and have done since before you knew they even existed. > The problem is that you have to find out what the parameter > is (it could be various things) and not what the value of a parameter > is. The controller is not set up for this. The controller cannot do > this. I agree that the usual way of doing this confuses people. Other > ways, using Button classes in ActionForms, for example, which I have > discussed at length elsewhere, is a really heavy and slow solution. I > find SimpleDispatchAction or the associated ImageTagUtil, which does not > use Action code at all clear and good ways to do this. You cannot avoid > the problem. The problem is real. How do you solve it? JavaScript? > Given the available solutions I have seen in Struts, which are: > LookupDispatchAction, Button classes outside the ActionForm, Button > class as an inner class in the ActionForm, ImageTagUtil, and > SimpleDispatchAction, I vastly prefer the last two. That's why I coded > them, of course, so I am prejudiced. > > >As for which of SimpleDA, MappingDA, FubarDA, whatever, is the best, > >all I have to say is that exposing the names of non-trivial Java > >methods in URLs, and so visible outside the container, makes me very > >queasy from a security perspective. So if I was forced to use a > >dispatch action, I would certainly choose one that did not rely on a > >query string parameter to specify the method name. > > > > > I am not sure what exposed methods you are talking about. This is not > required at all. Thanks for you contribution to this. I am glad you > weighed in. It is impossible to tell what silent people think. If you don't know "what exposed methods" I'm talking about, how could you possibly know that "This is not required at all"? You know very well what methods I'm talking about, and nowhere did I suggest that that they were required, only that they are extremely undesirable. -- Martin Cooper > > > > Michael McGrady > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]