3 Replies Latest reply on Sep 22, 2005 7:39 AM by Viet

    portal navigation

    martin di bella Newbie

      Is there any way to get the portal pages? My intention is create something like a "menu" with a link per page, something like Menu Portlet(default page in the default portal). Can they be created with PortetUrl object? Or they should be "hardcoded"?

      Thanks, Martin

        • 1. Re: portal navigation
          Viet Master

          There is such an API in JBoss Portal 2.2 that allows you to browse the envirnnment in which a portlet is triggered and create link to those objects.

          There is something similar in 2.0 but which is less powerfull and will be deprecated.

          • 2. Re: portal navigation
            Jacek Laskowski Newbie

            Could you elaborate more on the API in JP2.2? I'm just curious what's there.


            • 3. Re: portal navigation
              Viet Master

              to access the current node being used (a window node) :

              org.jboss.portlet.PortalNode node = org.jboss.portlet.Navigation.getCurrentNode();

              then you can navigate around that node with methods like

              // get the page
              // get sibbling windows
              // get a specific window

              you can test the node type :

              if (node.getType() == PortalNode.TYPE_WINDOW)

              and you can create links to a node :

              PortalNodeURL url = ((JBossRenderResponse)req).createRenderURL(node);
              writer.write("<a href='" + url.toString + "'>link</a>");

              You can see it in action in the CatalogPortlet in 2.2 which displays the pages relative to the target page or can display a sitemap in maximized window state.