4 Replies Latest reply on Aug 24, 2005 7:48 AM by Martin Giljohann

    User Portlet and Page Menu portlet on all pages

    Vivek Srivastav Newbie

      Is there a way that I can configure the JBoss Portal so that the page menu portlet and the User Portlet is displayed on all the pages. I have installed JBoss forum portlet and when I access the forum, I want to still have access to the user and menu portlets.

        • 1. Re: User Portlet and Page Menu portlet on all pages
          Martin Giljohann Newbie

          The reason for this is, that the link to the forums calls the Forumsportlet in maximised mode - no other portlets can be displayed

          • 2. Re: User Portlet and Page Menu portlet on all pages
            Vivek Srivastav Newbie

            I get the following message on the JBoss logs:

            11:17:34,390 WARN [RegionTagHandler] requested page has no region [left]

            Also I tried to minimize the forum portlet, but that's the only portlet on the page. Where is the page layout defined?

            • 3. Re: User Portlet and Page Menu portlet on all pages
              Woodler Expert

              the layout is defined as part of the portal properties (see default-portal.xml) , and in portal-layouts.xml ; the default layout does not use the RegionTagHandler, so you must have created your own layout and configured the portal to use it.
              The error message is logged when the region tag is asked to render a region that has no represenation on the current page. In other words: the tag is asked to render the 'left' region, but the current page (the one that is being rendered at the time) has no portlet assigned to that region.

              One way to get the menu and user portlet on all pages is to define them as portlet tags on the layout jsp, and make sure that you define a window for both of them on each page (jbp:portlet instanceRef='WindowIDHere' : see earlier posts for examples).
              One special case to consider is the maximized behavior. The LayoutStrategy currently filters all, but the maximized portlet from the list of portlets to render. In other words, if you maximize any portlet, that will be the only one that actually gets rendered, regarless of any region or portlet tag. Those can only display what was rendered already.

              A (better) documentation for all of these pieces and their interactions is in the works. Sorry for the current lack of it ....

              • 4. Re: User Portlet and Page Menu portlet on all pages
                Martin Giljohann Newbie

                 

                "yantriki" wrote:
                ... and when I access the forum, I want to still have access to the user and menu portlets.

                I think I found the problem and this is not possible with the ForumsPortlet at the moment.

                To see user and menu portlet with the forums, you need to call the forums in 'normal' windowstate - which works for the default OP_MAIN. But for the further request to show the forums index, the ForumsPortlet sets the windowstate to maximised:

                protected void doView([...] {
                [...]
                 if (req.getWindowState() != WindowState.MAXIMIZED)
                 {
                 writer.write("<table width=\"100%\" cellpadding=\"2\" cellspacing=\"2\"><tr class=\"portlet-section-body\">");
                
                 // Window is is normal mode
                 // Check if the user is an administrator
                 boolean isAdmin = req.hasPermission("Admin");
                 if (isAdmin)
                 {
                [...] }
                 else
                 {
                 writer.write("<td align=\"center\" class=\"portlet-menu-item\">");
                 }
                
                 //Create a link to the forum index
                 PortletURL showForumsURL = resp.createRenderURL();
                 showForumsURL.setWindowState(WindowState.MAXIMIZED);
                [...]

                The code fragement marked red always puts the further requests to the forums from normal into maximised state and no user portlet etc will be rendered.