struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Musachy Barroso <musa...@gmail.com>
Subject Re: WW-2394 really implemented?
Date Sun, 26 Apr 2009 21:02:51 GMT
In fact we don't have to use that setting at all, as the DMI magic
happens at execution time, not configuration building time. To enable
this, we only need to enable @Action to be applied to classes, and use
"execute" as the method, which would *have* to be in the class. I
would say this is a valid use case, considering we support it in XML
config, although I don't like it :)

musachy

On Sun, Apr 26, 2009 at 4:57 PM, Wes Wannemacher <wesw@wantii.com> 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.
>
> -Wes
>
> --
>
> 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: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>



-- 
"Hey you! Would you help me to carry the stone?" Pink Floyd

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Mime
View raw message