Hello guys,
Page request parameter in which a parameter send with liferay page URLwill be like i.e
http://192.168.3.10:8080/group/dentalnotebook/patientprofile?patientId=140701
we can read a page request parameter in portlet controller and view.jsp in the liferay 6.2.
Below example will helps you to read page request parameter.
Read parameter in controller
HttpServletRequest request=PortalUtil.getHttpServletRequest(actionRequest);
HttpServletRequest originalRequest = PortalUtil.getOriginalServletRequest(request);
long patientId=Long.parseLong((String)ParamUtil.getString(originalRequest, "patientId"));
Read parameter in portlet JSP(wiew.jsp)
HttpServletRequest originalRequest = PortalUtil.getOriginalServletRequest(request);
long patientId=Long.parseLong((String)ParamUtil.getString(originalRequest, "patientId"));
Thank you :)
0 Comment(s)