Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Zeeshan Khan
how to pass multiple parameters with form action in spring MVC
March 12, 2013 11:04 PM
Answer

Zeeshan Khan

Rank: Expert

Posts: 349

Join Date: July 20, 2011

Recent Posts

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
RE: how to pass multiple parameters with form action in spring MVC
March 13, 2013 12:01 AM
Answer

Steve Lan

Rank: New Member

Posts: 17

Join Date: May 30, 2012

Recent Posts

Hi,
1ParamUtil.getString(request, "name ");
2ParamUtil.getString(request, "dataTbaleId ");

I thank it can help you.
Jitendra Rajput
RE: how to pass multiple parameters with form action in spring MVC
March 13, 2013 12:08 AM
Answer

Jitendra Rajput

Rank: Liferay Master

Posts: 858

Join Date: January 7, 2011

Recent Posts

If PortletRequest doesn't work for you then use HttpServletRequest to get parameters.
Amit Doshi
RE: how to pass multiple parameters with form action in spring MVC
March 13, 2013 12:26 AM
Answer

Amit Doshi

Rank: Liferay Master

Posts: 549

Join Date: December 29, 2010

Recent Posts

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