Hi,
I was trying to display a different page in my portlet depending on the window state. If the window state is normal, I want to display view.xhtml, if the window state is maximized, I want to display maximized.xhtml.
I am using the JSR-301 PortletBridge with RF 3.1.3 on JBP 2.6.3. So I thought of a quick hack: I override GenericFacesPortlet's getDefaultViewId() method and, depending on the window state, return a different id:
public String getDefaultViewId(PortletRequest request, PortletMode mode) { if (request.getWindowState().equals(WindowState.MAXIMIZED)) { return this.getPortletConfig().getInitParameter( Bridge.DEFAULT_VIEWID + "." + mode.toString() + "." + request.getWindowState()); } return this.getPortletConfig().getInitParameter( Bridge.DEFAULT_VIEWID + "." + mode.toString()); }