UIPortlet uiPortlet = event.getSource();
PortalRequestContext context = (PortalRequestContext) event.getRequestContext();
List<UIPortlet> portletInstancesInPage = new ArrayList<UIPortlet>();
// UIPortalApplication uiPortal = uiPortlet.getAncestorOfType(UIPortalApplication.class);
UIPortalApplication uiPortal = (UIPortalApplication) context.getUIApplication();
uiPortal.findComponentOfType(portletInstancesInPage, UIPortlet.class);
EventsWrapper eventsWrapper = (EventsWrapper) event.getRequestContext().getAttribute(PORTLET_EVENTS);
List<javax.portlet.Event> events = eventsWrapper.getEvents();
/*
* Iterate over all the events that the processAction has generated. Check among all the portlet instances deployed