Liferay六年中持续被评为Gartner水平门户魔力象限领导者。 原因是

组合视图 统一视图 树状图
讨论主题 [ 上一个 | 下一个 ]
Kim Zeevaarders
IPC problems between Vaadin Portlets on different Liferay Pages
2013年4月8日 上午6:31

Kim Zeevaarders

等级: Junior Member

帖子: 29

加入日期: 2012年9月7日


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 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