(Öffnet neues Fenster)
Als Antwort markieren
IPC problems between Vaadin Portlets on different Liferay Pages
8. April 2013 06:31
Rang: Junior Member
Eintrittsdatum: 7. September 2012
We have two
portlets who communicate with each other using
Portlet 2.0 IPC-Events
. These two portlets are on different pages in
. 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
with the selected product as payload for the event.
The second portlet (pm21), which is on a different page,
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
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).
Melden Sie sich an, um diesen Artikel zu bewerten.
Bitte melden Sie sich an, um diesen Inhalt als unangebracht zu kennzeichnen.