Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Matthew O Smith
Interportlet communication across pages
July 15, 2011 2:21 PM
Answer

Matthew O Smith

Rank: Junior Member

Posts: 43

Join Date: April 29, 2009

Recent Posts

Hi all,

I have 2 portlets that are deployed to different pages that need to communicate. One is a summary portlet that needs to communicate to the other portlet which record the user wants to view. This seems like a perfect use of Events or public render parameters. As long as the portlets are on the same page all works as expected. Moving the portlets to different pages neither events nor render parameters are received.

I do have these set in the portal-ext.properties
1portlet.event.distribution=ALL_PORTLETS
2portlet.public.render.parameter.distribution=ALL_PORTLETS
3portlet.container.impl=sun


For fun I tried the sample Event portlet from http://java.net/downloads/portlet-container/samples/EventingMap.war and it exhibits the same behavior.

Liferay: 5.2.3 Glassfish Bundle.

Has anyone gotten this to work and if so, what is the magic incantation that is required?
Kamesh Sampath
RE: Interportlet communication across pages
July 15, 2011 3:03 PM
Answer

Kamesh Sampath

Rank: Regular Member

Posts: 159

Join Date: May 26, 2010

Recent Posts

i dont think so it will work, My thought is:

lets say we have Portlet-A on page I and Portlet-B on page II which are wired using the IPC, when you do some action on Portlet-A which will publish some events which will be listened by Portlet-B , ideally that will happen in background but as end user we can see that happen because events are per-request basis, so when you traverse to Page -II to look whether B has been updated another new request will be created and published events may disappear.

As a curious use case its worth trying emoticon

Regards,
Kamesh