Fórumok
how to pass multiple parameters with form action in spring MVC
Zeeshan Khan, módosítva 11 év-val korábban
how to pass multiple parameters with form action in spring MVC
Expert Bejegyzések: 349 Csatlakozás dátuma: 2011.07.21. Legújabb bejegyzések
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 !!
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, módosítva 11 év-val korábban
RE: how to pass multiple parameters with form action in spring MVC
New Member Bejegyzések: 17 Csatlakozás dátuma: 2012.05.31. Legújabb bejegyzések
Hi,
I thank it can help you.
ParamUtil.getString(request, "name ");
ParamUtil.getString(request, "dataTbaleId ");
I thank it can help you.
Jitendra Rajput, módosítva 11 év-val korábban
RE: how to pass multiple parameters with form action in spring MVC
Liferay Master Bejegyzések: 875 Csatlakozás dátuma: 2011.01.07. Legújabb bejegyzések
If PortletRequest doesn't work for you then use HttpServletRequest to get parameters.
Amit Doshi, módosítva 11 év-val korábban
RE: how to pass multiple parameters with form action in spring MVC
Liferay Master Bejegyzések: 550 Csatlakozás dátuma: 2010.12.29. Legújabb bejegyzések
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
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