1
votes

I have two portlets and these two are two different web applications (war).

When the user selects a radio button from Portlet1 it has to switch to Portlet2.

I am able to publish the event from Portlet1 and able to process from Portlet2 and both are getting rendered in separate divisions of the page template created from liferay portal.

But my problem is Portlet2 has to overlay portlet1 division (while displaying the content) and has to display the Portlet2 content in Portlet1 content division.

I am using liferay 6.0.5 and using struts portlet plugin to migrate existing application to liferay portal.

1
There appears to be multiple questions here. Do you mean that portlet1 and portlet2 are displayed on a Liferay page, and an action on portlet1 needs to change something in portlet2? Have a look at Public Render Parameters which is a standard for Portlets 2.0 and a simple way to pass simple (string) data from one portlet to another. also known as 'inter portlet communication' or IPCDavid O'Meara
i am able to communicate (IPC) between the portlets using the events. But on certain event in Portlet1 my next screen in Portlet1 need to be Portlet2 screen how i can get this done ?Laxmikanth Samudrala

1 Answers

2
votes

My suggestion would be to package both Portlet1 and Portlet2 into the same WAR file. Both portlets will use the same JSPs in that case and you will just configure the portlet XML files (portlet.xml and liferay-portlet.xml) with 2 portlets instead of one. You can configure both portlets to use a different start view.

With this setup it is easy to move from one view to another, as you're just switching between JSPs inside one WAR file and you don't really need inter-portlet communication.