Fórum

how to pass multiple parameters with form action in spring MVC

thumbnail
Zeeshan Khan, modificado 11 Anos atrás.

how to pass multiple parameters with form action in spring MVC

Expert Postagens: 349 Data de Entrada: 21/07/11 Postagens Recentes
Hi,

I am developing a spring mvc portlet using LR 6.1.
I have to pass the page name and the dataTbaleId from the jsp page with action (as we used to with "?" in action tag) so that we can get these two params in the controller class and do the further processing....


Thanks !!
Steve Lan, modificado 11 Anos atrás.

RE: how to pass multiple parameters with form action in spring MVC

New Member Postagens: 17 Data de Entrada: 31/05/12 Postagens Recentes
Hi,
ParamUtil.getString(request, "name ");
ParamUtil.getString(request, "dataTbaleId ");

I thank it can help you.
thumbnail
Jitendra Rajput, modificado 11 Anos atrás.

RE: how to pass multiple parameters with form action in spring MVC

Liferay Master Postagens: 875 Data de Entrada: 07/01/11 Postagens Recentes
If PortletRequest doesn't work for you then use HttpServletRequest to get parameters.
thumbnail
Amit Doshi, modificado 11 Anos atrás.

RE: how to pass multiple parameters with form action in spring MVC

Liferay Master Postagens: 550 Data de Entrada: 29/12/10 Postagens Recentes
Hi Zeeshan,

Please check below code in order to get value from the jsp.

@ActionMapping(params = Constants.MY_ACTION + StringPool.EQUAL + Constants.CANCEL_RETURN_REQUEST_ACTION)
public void cancelReturnRequestAction(ActionRequest actionRequest, ActionResponse actionResponse) throws IOException {
long requestId = ParamUtil.getLong(actionRequest, Constants.RESOURCE_PRIMARY_KEY);
System.out.println(requestId);
}

Thanks & Regards,
Amit Doshi