Foren

Cross Page events like in WebSphere Portal

Dmitriy Fundak, geändert vor 13 Jahren.

Cross Page events like in WebSphere Portal

New Member Beiträge: 5 Beitrittsdatum: 30.01.08 Neueste Beiträge
Hi,

How can I achieve similar functionality like WebSphere Portal cross page wires?
Are there any way or workaround to send event(any kind of IPC) to portlet on another page?

I have poor solution, it's not very comfortable because lots of logic on client side and unable to maintain page state.
Solution is to build url to another page with anchored parameters, like in gwt, at client side javascript and change window.location.

Example of such kind of url:
http://localhost:8080/web/guest/anotherpage#par1=value1&par2=value2

I am wondering are there any better ways to achieve this?

Regards,
Dmitriy Fundak
thumbnail
jelmer kuperus, geändert vor 13 Jahren.

RE: Cross Page events like in WebSphere Portal

Liferay Legend Beiträge: 1191 Beitrittsdatum: 10.03.10 Neueste Beiträge
By default, portlets can send and receive events with other portlets that are on the same page. This can be changed to enable portlets to send and receive events from other portlets that are on different pages. This can be done by adding the following property in portal-ext.properties

portlet.event.distribution=ALL_PORTLETS
thumbnail
jelmer kuperus, geändert vor 13 Jahren.

RE: Cross Page events like in WebSphere Portal

Liferay Legend Beiträge: 1191 Beitrittsdatum: 10.03.10 Neueste Beiträge
Or actually it should be portlet.event.distribution=layout
Dmitriy Fundak, geändert vor 12 Jahren.

RE: Cross Page events like in WebSphere Portal

New Member Beiträge: 5 Beitrittsdatum: 30.01.08 Neueste Beiträge
Thanks.
Now it works fine.
I have liferay version 6.0.6

I added to portal-ext.properties:

layout.default.p_l_reset=false

#Cross Page Events
portlet.event.distribution=layout-set
portlet.public.render.parameter.distribution=layout-set


And events send by code like this:

    public void processAction(ActionRequest request, ActionResponse response)
			throws PortletException, IOException {
		...
		BPMEvent bpmEvent = new BPMEvent();
		....
		response.setEvent(qname, bpmEvent);
		...
		response.sendRedirect("/web/guest/anotherpage");
	}