Forums de discussion

Interportlet communication across pages

Matthew O Smith, modifié il y a 12 années.

Interportlet communication across pages

Junior Member Publications: 43 Date d'inscription: 29/04/09 Publications récentes
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
portlet.event.distribution=ALL_PORTLETS
portlet.public.render.parameter.distribution=ALL_PORTLETS
portlet.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?
thumbnail
Kamesh Sampath, modifié il y a 12 années.

RE: Interportlet communication across pages

Regular Member Publications: 158 Date d'inscription: 27/05/10 Publications récentes
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