Again you're right, I'm not sure how I got so far off-track. As Musachy said it is a valid use-case so we'll try to get it in.
On 4/26/09, Andreas Joseph Krogh <[email protected]> wrote: > On Sunday 26 April 2009 10:57:59 pm Wes Wannemacher wrote: >> On Sunday 26 April 2009 04:53:23 pm Andreas Joseph Krogh wrote: >> > On Sunday 26 April 2009 10:48:33 pm Wes Wannemacher wrote: >> > > On Sunday 26 April 2009 04:43:42 pm Andreas Joseph Krogh wrote: >> > > > On Sunday 26 April 2009 10:32:43 pm Wes Wannemacher wrote: >> > > > > On Sunday 26 April 2009 04:27:28 pm Andreas Joseph Krogh wrote: >> > > > > > On Sunday 26 April 2009 10:10:29 pm Musachy Barroso wrote: >> > > > > > > But you always map a url to a method, an action is not >> > > > > > > executed, >> > > > > > > a method is. Even if you don't specify a method, "execute" >> > > > > > > will >> > > > > > > be used by default. >> > > > > > >> > > > > > I like the methods to be a parameter (&method:next=true for >> > > > > > calling >> > > > > > MyAction.nex() for example) not part of the URI itself. >> > > > > >> > > > > Hmm... that sounds sort of dangerous to me :), but if it is >> > > > > functionality you would like, feel free to create a patch. Just >> > > > > make >> > > > > sure that it is behavior you can only activate by setting a >> > > > > configuration parameter. >> > > > >> > > > This is no different from what you can do today, only you need to >> > > > map >> > > > your actions in struts.xml or accept the convention-name for your >> > > > action (MyAction => action name="my"). Wouldn't applying the >> > > > annotation >> > > > to the class be enough, why introduce another config-param to >> > > > active? >> > > > It's not like I'm proposing introducing something which isn't >> > > > possible >> > > > today and impose some kind of security-risk. >> > > >> > > The only part I was talking about was calling a method pointed to by a >> > > request param. As Musachy pointed out, the DynamicMethodInvocation is >> > > already available as a config param. >> > >> > From your wording it sounded like it was something you wanted the user >> > to >> > explicitly enable, which didn't make much snece to me as invoking a >> > method >> > on the action by specifying "&method:myMethodName=true" on the request >> > already works and is enabled by default today. >> >> Sorry, you're right, it looks like it is enabled by default. I thought for >> a >> time we had it turned off by default. Oh well, anyhow, I would say to make >> >> sure that you honor it. > > But then again, that hasn't got anything to do with using > @Actions-annotations on class-level? > > -- > Andreas Joseph Krogh <[email protected]> > Senior Software Developer / CEO > ------------------------+---------------------------------------------+ > OfficeNet AS | The most difficult thing in the world is to | > Rosenholmveien 25 | know how to do a thing and to watch | > 1414 TrollÄsen | somebody else doing it wrong, without | > NORWAY | comment. | > | | > Tlf: +47 24 15 38 90 | | > Fax: +47 24 15 38 91 | | > Mobile: +47 909 56 963 | | > ------------------------+---------------------------------------------+ > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > -- Wes Wannemacher Author - Struts 2 In Practice Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more http://www.manning.com/wannemacher --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
