while (eventReader.hasNext()) {
final CharacterEvent event = eventReader.next();
switch (event.getEventType()) {
case PORTLET_HEADER: {
final PortletHeaderPlaceholderEvent headerEvent = (PortletHeaderPlaceholderEvent)event;
final IPortletWindowId portletWindowId = headerEvent.getPortletWindowId();
if (!this.portletExecutionManager.isPortletRenderHeaderRequested(portletWindowId, request, response)) {
this.portletExecutionManager.startPortletHeaderRender(portletWindowId, request, response);
}
break;
}
case PORTLET_CONTENT: {
final PortletContentPlaceholderEvent headerEvent = (PortletContentPlaceholderEvent)event;
final IPortletWindowId portletWindowId = headerEvent.getPortletWindowId();
if (!this.portletExecutionManager.isPortletRenderRequested(portletWindowId, request, response)) {
this.portletExecutionManager.startPortletRender(portletWindowId, request, response);
}