Return-Path: X-Original-To: apmail-struts-issues-archive@minotaur.apache.org Delivered-To: apmail-struts-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 59A4B113C3 for ; Fri, 27 Jun 2014 08:13:30 +0000 (UTC) Received: (qmail 38518 invoked by uid 500); 27 Jun 2014 08:13:26 -0000 Delivered-To: apmail-struts-issues-archive@struts.apache.org Received: (qmail 38474 invoked by uid 500); 27 Jun 2014 08:13:26 -0000 Mailing-List: contact issues-help@struts.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@struts.apache.org Delivered-To: mailing list issues@struts.apache.org Received: (qmail 38386 invoked by uid 99); 27 Jun 2014 08:13:25 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 27 Jun 2014 08:13:25 +0000 Date: Fri, 27 Jun 2014 08:13:25 +0000 (UTC) From: "Lukasz Lenart (JIRA)" To: issues@struts.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (WW-4366) Action methods should accept arguments like @QueryParam, @FormParam, @PathParam and specific request methods GET, PUT, POST etc MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/WW-4366?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Lukasz Lenart updated WW-4366: ------------------------------ Fix Version/s: 2.5 > Action methods should accept arguments like @QueryParam, @FormParam, @PathParam and specific request methods GET, PUT, POST etc > --------------------------------------------------------------------------------------------------------------------------------- > > Key: WW-4366 > URL: https://issues.apache.org/jira/browse/WW-4366 > Project: Struts 2 > Issue Type: New Feature > Components: Core Actions > Reporter: samarjit samanta > Labels: features > Fix For: 2.5 > > > Struts2 action methods should accept arguments just like JAX-RS specs. Also certain method types should be allowed only like GET, PUT, POST, DELTE. > Inspiration might be taken from struts-json plugin @SMDMthod but that is not a real action method. > If there are multiple action methods in a Action class then it becomes less obvious which variables are used for a particular action method. > Ex. > @ActionPath("/books/{id}") > public String showAction(@PathParam("id") String id, > @QueryParam("name") String name) { > ... > return "success"; > } > Also flexible return types as defined in JAX-RS would be great or atleast Result.json(myObject).includeActionErrors().includeActionMessages().done(); > Result.string(myString).done(); > Result.create("json").from(myObject).param("includeActionErrors,includeActionMessages").done(); > Inspiration can be taken from struts2-json-plugin#SMDMethod and (struts2-freeroute-plugin) [https://github.com/bastengao/struts2-freeroute] -- This message was sent by Atlassian JIRA (v6.2#6252)