Kombinierte Ansicht Flache Ansicht Baumansicht
Threads [ Zurück | Nächste ]
Kim Zeevaarders
IPC problems between Vaadin Portlets on different Liferay Pages
8. April 2013 06:31

Kim Zeevaarders

Rang: Junior Member

Nachrichten: 83

Eintrittsdatum: 7. September 2012

Neue Beiträge

Hello guys,

We have two Vaadin 7.0.1 portlets who communicate with each other using Portlet 2.0 IPC-Events. These two portlets are on different pages in Liferay (6.0.12EE). We added the required settings to portal-ext.properties to allow distribution of events across pages.

The first portlet (pm12) shows a number of products. When a product is selected and right-clicked, an event is published with the selected product as payload for the event.

The second portlet (pm21), which is on a different page, consumes this event, retrieves the product from it and shows all the attributes of the selected product in the page.

Not a very difficult use-case I would say!

However, the pm21 portlet only consumes the event (read: enters the processEvent method of PortletListener interface) if the page on which the pm21 is deployed is accessed in the browser (by the user) beforehand. This causes the init method of the pm21 portlet’s main UI class to be called, in which the portletlistener is added to the portletSession. After this addition the portlet can handle events. This seems logical.

If the user does not access the page beforehand and the pm12 portlet produces the event , nothing happens in the pm21 portlet, because the processEvent method is not called, because the portletListener is not added to the session, because the init method in the UI is not called!

We are looking for a way around this problem and hope you guys can help. Vaadin 6 does not have this problem (so it seems).


Kim Zeevaarders
The Netherlands

Participate in the State of Liferay Community 2017. Help the community and even win some prizes!