PortalEnvironment portalEnv = PortalEnvironment.getPortalEnvironment(
(HttpServletRequest) pageContext.getRequest());
PortalURL portalURL = portalEnv.getRequestedPortalURL();
// Create the portlet window to render.
PortletWindow window = new PortletWindowImpl(windowConfig, portalURL);
// Check if someone else is maximized. If yes, don't show content.
Map windowStates = portalURL.getWindowStates();
for (Iterator it = windowStates.keySet().iterator(); it.hasNext(); ) {
String windowId = (String) it.next();
WindowState windowState = (WindowState) windowStates.get(windowId);
if (WindowState.MAXIMIZED.equals(windowState)
&& !window.getId().getStringId().equals(windowId)) {
return SKIP_BODY;
}
}
// Create portal servlet request and response to wrap the original