Code example for Listener Portlet (ipc1)
package com.sun.portal.portlet.ipc1;
import com.sun.portal.portletappengine.ipc.EventRequest;
import com.sun.portal.portletappengine.ipc.EventResponse;
import com.sun.portal.portletappengine.ipc.PortletEventListener;
...
/**
* The ConsiderationPortlet participates in the InterPortletCommunication.
* This consumes the event generated by the PricePortlet which is in a
* different web application.
*/
public class ConsiderationPortlet extends GenericPortlet{
implements PortletEventListener ...
public void handleEvent(EventRequest ereq, EventResponse eres) {
String data = (String) ereq.getEventData();
eres.setRenderParameter("price", data);
}
...
}