掲示板

Interportlet communication across pages

12年前 に Matthew O Smith によって更新されました。

Interportlet communication across pages

Junior Member 投稿: 43 参加年月日: 09/04/29 最新の投稿
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
12年前 に Kamesh Sampath によって更新されました。

RE: Interportlet communication across pages

Regular Member 投稿: 158 参加年月日: 10/05/27 最新の投稿
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