Sun Java System Portal Server 7 Configuration Guide

Accessing Portlet APIs

Developers can access the portlet APIs from the FacesContext object as shown here:

FacesContext facesContext = FacesContext.getCurrentInstance();
PortletRequest pRequest = (PortletRequest)facesContext.getExternalContext().getRequest();

To find the portlet window state (like Maximize and Normalize), do the following:

WindowState windowState = pRequest.getWindowState();