Page to page communication and/or IPC in different war

I came across to many threads on forums where people asking for page to page communication in which they have portlet A on page1 and portlet B on page2 and they want to establish communication between Portlet A and portlet B and also want to pass parameter from portletA to Portlet B.
I thougt of writing a solution for the same on my blog, instead of replying on every forum ;-)

anyways..., well for this kind of scenario and also usecases like IPC in different war, this will be helpful
Note:- This is only IBM Portal specific solution, because JSR168/286 doesn't provide any mechanism for page to page communication so far.
JSR286 has eventing by which IPC in different war can be achieved.

IBM provides a set of Helper classess, they call it
IBM's Advanced URL Genenration Helper Classes.

There are few set of classes i have worked with to achieve all above usecases.
PortletURLHelper
ServletURLHelper
OffLineURLHelper
All of these classess contains loverloaded generateUrl method.

For IPC or page to page communication you can use any of generateURL method and pass parameters like pageuniquename, portletuniquename, map and etc...

have a look at For IPC in differect war,
have a look at How to assigning unique name to page and portlet

2 comments:

tiny301 said...

fuction PortletUrlHelper.generateUrl(..) have support in liferay? I deploy file war into liferay portal ==> it not work. Thanks

Neeraj Sidhaye said...

PortletURLHelper is IBM specific API and won't work in Liferay.
You can very well use eventing if you are developing JSR286 portlet.