3 Replies Latest reply on Sep 15, 2006 12:08 PM by soshah

    How to predifine a portlet window state?

    serein

      Hello!

      I want my portlet always been initialized in MAXIMIZED state, not in normal. Is that possible?

      Thanx, Alexander.

        • 1. Re: How to predifine a portlet window state?

          we don't provide that now but it is certainly smth to look at.

          • 2. Re: How to predifine a portlet window state?
            serein

            Ok, I've found a way to do this myself.
            I have a JSF portlet with several pages. When accesing a page, I put it's name into HttpServletSession. Then in class org.jboss.portal.core.command.InvokeWindowRenderCommand.java I get this parameter from session and so choose a window state in which the current page should be displayed.
            That works perfectly except the case when I switch this way from MAXIMIZED state to any others. The blank space is displayed instead of my JSF portlet. But when I click the Refresh button of my browser, the window is displayed correctly.
            How could this be fixed?

            Thanx, Alexander.

            • 3. Re: How to predifine a portlet window state?
              soshah

              Shlyannikov-

              Insetad of changing the behavior of InvokeWindowRenderCommand in portal which could lead to unpredictable behavior for some usecases that you may not test here is a couple of things you might want to try-

              1) Specify in your portlet.xml that only MAXIMIZED state is needed for this JSFPortlet


              2) Maybe control the state by extending the MyFacesGenericPortlet that bridges you between the Portlet and the JSF world

              Thanks
              Sohil