Note that there are some explanatory texts on larger screens.

plurals
  1. POSpring portlet @ActionMapping usage
    text
    copied!<p>could please anybody explain, how POST request should be mapped properly ? it is not clear from API documentation. </p> <p>value should be assigned with the value of the action parameter javax.portlet.action</p> <pre><code>@ActionMapping(value = "addDocOrder") public void addDocOrder(@ModelAttribute("order")....... </code></pre> <p>AND next we have "params" (JAVADOC: The parameters of the mapped request, narrowing the primary mapping.) </p> <pre><code>@ActionMapping(params = "action=addDocOrder") public void addDocOrder(@ModelAttribute("order")....... </code></pre> <blockquote> <blockquote> <p>JAVADOC for value() parameter of annotation: The name of the action, according to the Portlet 2.0 "javax.portlet.action" parameter. If not specified, the method will be used as default handler: i.e. for action requests where no specific action mapping was found. Note that all such annotated action methods only apply within the @RequestMapping constraints of the containing handler class.</p> </blockquote> </blockquote> <p>I absolutely don't get what is the point of the existence of the "value" annotation parameter. it has afaik no sense in being there ...it is meant to be the primary mapping, params the secondary one, but {params = "action=addOrder"} makes "value" redundant.</p> <p>PLEASE: Take a look at this issue which is also relevant <a href="https://stackoverflow.com/questions/4782971/handling-ajax-requests-with-spring-portlet">https://stackoverflow.com/questions/4782971/handling-ajax-requests-with-spring-portlet</a></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload