I'm developing a liferay application using liferay 6.2.2 with JSF portlets.

I have on my page 2 instances of a portlet A (which fire the event) and 2 instances of a portlet B (which can receive the event).

EDIT : I'm using Liferay Client side IPC system with js for the sending/receiving of the event.

My objective is for portlet B1 to receive the event sent by portlet A1 and the same for the 2 others (B2 from A2).

Managed beans are ViewScoped (ajax compatible). In order to select which portlet should process the correct event, I use portlet ID (the receiverId is in the event payload).

All portlets are instanceable (true) and ajaxable(true).
At the moment, when I sent the event from A1 to B1, everything works fine. When I try to send from A2 to B2, nothing happens.

The portlet Id sent through the payload of the event matches the intended receiving portlet.

A managed bean instance for each portlet instance is correctly created during the init (@PostConstruct) phase of the page (I have two different addresses for the managed bean instances), when the page is either loaded or reloaded.

The intended behavior when firing an event is for each receiving portlet to check if the portlet Id in the payload matches its own id. If yes, the method called continue. If not, the method is stopped(return;).

The problem is : Only one managed bean instance (say B1) is called (2 times) when the event is fired (Liferay.fire / Liferay.on mechanism), while it was expected that each instance of the Managed bean (B1 and B2) should be called one time.

thanks you for your time reading me

0

There are 0 best solutions below