Loading...

dev@struts.apache.org

[Prev] Thread [Next]  |  [Prev] Date [Next]

Re: WW-2394 really implemented? Musachy Barroso Tue Apr 28 04:02:15 2009

ok changes are in, and the doc has been updated:

http://cwiki.apache.org/confluence/display/WW/[EMAIL 
PROTECTED]@Actionsattheclasslevel

give it a try and let me know. @Actions and @Action can now be applied
to classes. if an "execute" method is defined in the class, it will be
used as the target method(can be overridden by DMI at runtime),
otherwise the target method will be null (and it gets determined at
runtime by REST or DMI)

musachy

On Sun, Apr 26, 2009 at 6:22 PM, Musachy Barroso <[EMAIL PROTECTED]> wrote:
> https://issues.apache.org/struts/browse/WW-3101
>
> I am taking a look at it.
> musachy
>
> On Sun, Apr 26, 2009 at 5:52 PM, Wes Wannemacher <[EMAIL PROTECTED]> wrote:
>> 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]
>>
>>
>
>
>
> --
> "Hey you! Would you help me to carry the stone?" Pink Floyd
>



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

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