The system function portalLib.setWindowState() is used to set the window state of the portlet.
The function produces an error if the portlet cannot switch to the specified window state for any reason. A runtime error is also produced if setWindowState() is called during render processing rather than during the processing of an action.
portalLib.setWindowState(
state WindowStateKind)
portalLib.setWindowState(WindowStateKind.maximized);