What am I missing? Why not just the @action annotation? The whole method annotation seems to have risen out of a poor definition of "action". I consider the action the entire follow of execution. From mapping to result (Interceptors and the Action class too).
>From the DefaultActionMapper documentation: *With method-prefix, instead of calling baz action's execute() method (by default if it isn't overriden in struts.xml to be something else), the baz action's anotherMethod() will be called. A very elegant way determine which button is clicked. Alternatively, one would have submit button set a particular value on the action when clicked, and the execute() method decides on what to do with the setted value depending on which button is clicked. * If you need an annotation on "anotherMethod" @action would be functionally equivalent to @method. Of course you wouldn't be able to use the "method:" prefix but then you wouldn't have any need. On Sun, Oct 6, 2013 at 11:23 PM, Lukasz Lenart <lukaszlen...@apache.org>wrote: > I think @ActionMethod or @Method is very handy. I'm still wondering > about how to map which actions are allowed to be used with "action:" > prefix - what about dropping "action:" prefix and stick only with > "method:" and "<s:form method=...>" ? > > > Regards > -- > Łukasz > + 48 606 323 122 http://www.lenart.org.pl/ > > 2013/10/4 Steven Benitez <steven.beni...@gmail.com>: > > I suggested this because I wrote an interceptor to require the > > @ActionMethod annotation years ago to lock down DMI. The upside to a > > separate annotation was that it was completely compatible with XML > > configuration (which I use). It also had a nice benefit of being > > documentation, as well. No ambiguity as to whether an method was an > > invocable action method or just a method that returned a String. > > > > > > On Fri, Oct 4, 2013 at 10:37 AM, Paul Benedict <pbened...@apache.org> > wrote: > > > >> I like that WAY better. Instead of using opaque strings in @Action, use > >> @ActionMethod on the destination methods. +1 > >> > >> > >> On Fri, Oct 4, 2013 at 4:31 AM, Lukasz Lenart <lukaszlen...@apache.org > >> >wrote: > >> > >> > 2013/10/3 Steven Benitez <steven.beni...@gmail.com>: > >> > > Why not just have an @ActionMethod annotation? If its on the action > >> > method, > >> > > you can invoke it, if not, you can't. The global config option for > >> > allowed > >> > > methods sounds reasonable (e.g., execute, input, etc.) > >> > > >> > Nice idea and quite simple :-) What about "allowedActions" ? Maybe > >> > extend @Action annotation and add "callable = true|false" which will > >> > indicate if action can be called by action: prefix. > >> > > >> > > >> > Regards > >> > -- > >> > Łukasz > >> > + 48 606 323 122 http://www.lenart.org.pl/ > >> > > >> > --------------------------------------------------------------------- > >> > To unsubscribe, e-mail: dev-unsubscr...@struts.apache.org > >> > For additional commands, e-mail: dev-h...@struts.apache.org > >> > > >> > > >> > >> > >> -- > >> Cheers, > >> Paul > >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscr...@struts.apache.org > For additional commands, e-mail: dev-h...@struts.apache.org > >