Inter Portlet Communication (IPC) in Liferay 7.4
"javax.portlet.supported-public-render-parameter=ipcMessage"
@Override
public void processAction(ActionRequest actionRequest, ActionResponse actionResponse)
throws IOException, PortletException {
String ipcMessage =ParamUtil.getString(actionRequest, "sendingValue");
actionResponse.setRenderParameter("ipcMessage", ipcMessage);
}
"javax.portlet.supported-public-render-parameter=ipcMessage"
6) get the value sender value into recieverportlet in render or doview method
@Override
public void render(RenderRequest renderRequest, RenderResponse renderResponse)
throws IOException, PortletException {
String senderValueIs = ParamUtil.getString(renderRequest, "ipcMessage");
renderRequest.setAttribute("reciveValue", senderValueIs);
super.render(renderRequest, renderResponse);
}
7) Deploy the both portlets
8) Add the portlets into a page in liferay portal
No comments:
Post a Comment