Foren

Can anyone have idea about Inter Portlet Communication in Liferay 7?

Vishal Munjani, geändert vor 6 Jahren.

Can anyone have idea about Inter Portlet Communication in Liferay 7?

Junior Member Beiträge: 33 Beitrittsdatum: 21.02.17 Neueste Beiträge
Hello,

Can any one provide the flow of IPC in liferay 7?
thumbnail
Olaf Kock, geändert vor 6 Jahren.

RE: Can anyone have idea about Inter Portlet Communication in Liferay 7?

Liferay Legend Beiträge: 6403 Beitrittsdatum: 23.09.08 Neueste Beiträge
Vishal Munjani:
Can any one provide the flow of IPC in liferay 7?


it's exactly the same as in Liferay 6.2 - if you have OSGi portlets, you'll just need to map the portlet.xml entries to the equivalent properties in your @Component declaration. For WAR/WAB deployments, nothing changed at all
Vishal Munjani, geändert vor 6 Jahren.

RE: Can anyone have idea about Inter Portlet Communication in Liferay 7?

Junior Member Beiträge: 33 Beitrittsdatum: 21.02.17 Neueste Beiträge
hello,

I made two portlet Event Producer Portlet and Event Listener Portlet . It works fine within same page but it is not working in different pages.

I also added following portal property in portal-ext.properties file.
portlet.event.distribution=layout-set

can anyone solve this problem?

Thanks,
Vishal
thumbnail
Olaf Kock, geändert vor 6 Jahren.

RE: Can anyone have idea about Inter Portlet Communication in Liferay 7?

Liferay Legend Beiträge: 6403 Beitrittsdatum: 23.09.08 Neueste Beiträge
Vishal Munjani:
I made two portlet Event Producer Portlet and Event Listener Portlet . It works fine within same page but it is not working in different pages.


I'd recommend not distributing to other pages: Portlet eventing is inherently UI based. There should be no business logic attached to the events, rather only UI level stuff. And when you change pages, a portlet's state is reset by default - a portlet then should show what's appropriate regarding the current state of the business logic.

It might work for you now - but doesn't scale up: Imagine having hundreds of pages that communicate to each other, "just in case" someone changes over to them. This would keep a huge amount of state on the server, which most likely will go unused.

I'm recommending portlet eventing only for UI use, this implies that they are on the same page - if only to make portal administration maintainable.

My proposed solution: Rearchitect, so that you're not relying on eventing for portlets on different pages.