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 Mon, 27 Apr 2009 12:57:29 GMT
Wild cards are different from DMI, from the docs:

"The Wildcard Method feature is implemented differently. When a
Wildcard Method action is invoked, the framework acts as if the
matching action had been hardcoded in the configuration. The framework
"believes" it's executing the action Category!create and "knows" it is
executing the create method of the corresponding Action class.
Accordingly, we can add for a Wildcard Method action mapping its own
validations, message resources, and type converters, just like a
conventional action mapping. For this reason, the Wildcard Method is
preferred."

I am not sure that Convention works with wild cards, I have never
looked into it.

musachy

On Mon, Apr 27, 2009 at 6:35 AM, Andreas Joseph Krogh
<andreak@officenet.no> wrote:
> On Monday 27 April 2009 01:11:13 am Musachy Barroso wrote:
>> ok changes are in, and the doc has been updated:
>>
>> http://cwiki.apache.org/confluence/display/WW/Convention+Plugin#ConventionPlugin-Applying@Actionand@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)
>
> I have now found some time to test it and it appears it's not working the same way as
actions defined in struts.xml with respect to wildcard-patterns.
> For example, say you have the following in struts.xml:
> <action name="user_*" class="userAction" method="{1}">
>
> How do I accomplish the same thing using annotations?
>
> --
> Andreas Joseph Krogh <andreak@officenet.no>
> 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: 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