Developers can access the portlet APIs from the FacesContext object as shown here:
FacesContext facesContext = FacesContext.getCurrentInstance(); PortletRequest pRequest = (PortletRequest)facesContext. getExternalContext().getRequest();
Use the command to find the portlet window state (like Maximize and Normalize).
WindowState windowState = pRequest.getWindowState();