for (UIPortlet uiPortletInPage : portletInstancesInPage) {
if (uiPortletInPage.supportsProcessingEvent(eventName)
&& !eventsWrapper.isInvokedTooManyTimes(uiPortletInPage)) {
List<javax.portlet.Event> newEvents = processEvent(uiPortletInPage, nativeEvent);
eventsWrapper.increaseCounter(uiPortletInPage);
if (context.useAjax()) {
log.info("Events were generated inside the scope of an AJAX call, hence will only refresh the targeted portlets");
event.getRequestContext().addUIComponentToUpdateByAjax(uiPortletInPage);
} else {
log.info("Events were generated outside the scope of an AJAX call, hence will make a full render of the page");
context.ignoreAJAXUpdateOnPortlets(true);