5 Replies Latest reply on Apr 7, 2006 9:54 AM by mholzner

    Why doesn't "response.sendRedirect" work?

    toxyman

      I'm tyring to send a "response.sendRedirect" from the defalut installation in file "jboss-portal.sar\portal-core.war\layouts\generic\index.jsp", but it just doesen't work. Nothing happens. Just ignors it.

      Is it possible to use "response.sendRedirect" i Portal?
      Is there another way to accomplish a redirect i Portal?

      Thanks for all answers

        • 1. Re: Why doesn't

          if you need a redirect, you should do it in any of your portlets. The layout jsp is rendered at the very end of the rendering cycle, so it would be very unwise to do all the work and then at the very last moment throw it all away.

          What is your use case? Why do you need a redirect from the layout JSP ?

          • 2. Re: Why doesn't
            toxyman

            I'm only using the Navigation and Center area in my Portal as default and I want the "maximized funktion"(maximized.jsp) to be displayed, so I redirect from index.jsp page to for example
            "http://localhost:8080/portal/index.html?ctrl:cmd=nav&ctrl:windowstate=maximized&ctrl:window=default.My+page.my_page"
            when 'My page' is chosen.

            • 3. Re: Why doesn't

              sorry, I still don't get it. Are you saying that you create that URL yourself? Or are you using a portal API to get it?

              You want the portlet in the center area to be maximized, whenever you choose one in the navigation?

              Please try to be a bit clearer about the separation of page and portlet window.
              The navigation is pointing to a page, the page contains zero, one or more portlet windows. The page cannot be maximized, it's the portlet window that can.

              I'm still confused about what it is that you are trying to do here.....

              If you could step back a bit and explain the use case you are trying to cover here, that might help me getting you the right answer.

              • 4. Re: Why doesn't
                toxyman

                Ok. If you take the default installation and on the default page click the little maximized icon on the default CMS portlet upper right corner, the page will reload to the maximized state(maximized.jsp). With the Navigation portlet on the top and the CMS portlet at center - maximized.
                I want to have this "state"(maximized) as default. And when you choose in this case "Test" in Navigation portlet the Test page should be displayed in the same maximized state only with the "Test portlet" in maximized state at center and of course the navigation at top.

                What I can understand the only way to accomplish this is to redirect in index.jsp, for example when "Test" i chosen in Navigation portlet, to "/portal/index.html?ctrl:cmd=nav&ctrl:windowstate=maximized&ctrl:window=default.Test.TestPortletWindow".

                • 5. Re: Why doesn't

                  no, no , no !

                  You are confusing concepts here.
                  What you should do is define a page with only the navigation portlet and the CMS portlet on it. That page will then appear in the 'natural' navigation menu, and when you select it, only the nav and the CMS portlets will show.
                  There is no need to use the maximized state, nore for any redirects!

                  Define your page in the ***-objects.xml as a child of the portal (i.e. make it a first level page) if you want it to show up in the top navigation (like default and test, OTB), or as a child of a first level page, if you want it to show up in the side navigation.

                  To maximize the space you get for the CMS portlet in the layout, you can take a look at the maximized layout jsp and the CSS selector for the maximized region in the theme css , and build your own layout and theme out of it that fits your specific needs.