Return-Path: X-Original-To: apmail-struts-dev-archive@www.apache.org Delivered-To: apmail-struts-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 55BAD10C93 for ; Wed, 9 Oct 2013 22:59:27 +0000 (UTC) Received: (qmail 58953 invoked by uid 500); 9 Oct 2013 22:59:27 -0000 Delivered-To: apmail-struts-dev-archive@struts.apache.org Received: (qmail 58929 invoked by uid 500); 9 Oct 2013 22:59:27 -0000 Mailing-List: contact dev-help@struts.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Struts Developers List" Reply-To: "Struts Developers List" Delivered-To: mailing list dev@struts.apache.org Received: (qmail 58921 invoked by uid 99); 9 Oct 2013 22:59:26 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 09 Oct 2013 22:59:26 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of ken.mcwilliams@gmail.com designates 209.85.214.182 as permitted sender) Received: from [209.85.214.182] (HELO mail-ob0-f182.google.com) (209.85.214.182) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 09 Oct 2013 22:59:20 +0000 Received: by mail-ob0-f182.google.com with SMTP id wn1so1171228obc.41 for ; Wed, 09 Oct 2013 15:58:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=bMv0mZ7KfrJA4Y78nf6U4lKAR7z0DXz93Sd9Ruqmotc=; b=QzVzhOAPlK3mMheb4I/6dfJUpYiABctBvzfzEXC4YT/jPtZ1+FUBgd4Cfdm7xmYjXN MaheOjd55p72DMTerqwQljM1npiDfInTkmUCCfGRZSF19PYGpP7U09dX/1kvAYDTEzYo MQ6dEgDUFd3BYyjMChPix6ouRcbSfVGTrvJgji5WU8Z2z3YF+w6ttomezewL7UO9zT1j 7sWXT9MI5kYY0ZW/nugu1OO/f99Lkue2joVH7exwbE9eyROuQTdroZj8+3WKZJ+U5v73 DzQGzcOQUKDfXfEVCItw126kfpxpNvaVo/zbGKdDZ85vFwIosKEjdZ0MCmx/Y4kEvZK7 pVfg== MIME-Version: 1.0 X-Received: by 10.60.52.1 with SMTP id p1mr3680940oeo.41.1381359539396; Wed, 09 Oct 2013 15:58:59 -0700 (PDT) Received: by 10.76.88.233 with HTTP; Wed, 9 Oct 2013 15:58:59 -0700 (PDT) In-Reply-To: References: Date: Wed, 9 Oct 2013 16:58:59 -0600 Message-ID: Subject: Re: Strict DMI From: Ken McWilliams To: Struts Developers List Content-Type: multipart/alternative; boundary=001a113334a0a7254a04e856d408 X-Virus-Checked: Checked by ClamAV on apache.org --001a113334a0a7254a04e856d408 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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 wro= te: > 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 "" ? > > > Regards > -- > =C5=81ukasz > + 48 606 323 122 http://www.lenart.org.pl/ > > 2013/10/4 Steven Benitez : > > 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 > wrote: > > > >> I like that WAY better. Instead of using opaque strings in @Action, us= e > >> @ActionMethod on the destination methods. +1 > >> > >> > >> On Fri, Oct 4, 2013 at 4:31 AM, Lukasz Lenart >> >wrote: > >> > >> > 2013/10/3 Steven Benitez : > >> > > Why not just have an @ActionMethod annotation? If its on the actio= n > >> > 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 =3D true|false" which wi= ll > >> > indicate if action can be called by action: prefix. > >> > > >> > > >> > Regards > >> > -- > >> > =C5=81ukasz > >> > + 48 606 323 122 http://www.lenart.org.pl/ > >> > > >> > --------------------------------------------------------------------= - > >> > To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org > >> > For additional commands, e-mail: dev-help@struts.apache.org > >> > > >> > > >> > >> > >> -- > >> Cheers, > >> Paul > >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org > For additional commands, e-mail: dev-help@struts.apache.org > > --001a113334a0a7254a04e856d408--