4 Replies Latest reply on Oct 8, 2012 1:05 PM by sonicaaaa

    References to Navigation

    sonicaaaa

      Hi all, I am trying to fetch navigation infos from a groovy template different than UIPortalNavigation.gtmpl .

       

      Could you suggest me a way to fetch those infos?

       

      I have tried with the same code I have found in UIPortalNavigation

       

      def rootNodes = uicomponent.getNavigations();
      

       

       

      but it seems that uicomponent is null.

       

       

      Any suggestions?

       

       

      thank you

       

      paolo

        • 1. Re: References to Navigation
          vstorm83

          uicomponent.getNavigations() in that template point to org.exoplatform.portal.webui.navigation.UIPortalNavigation#getNavigations(). You can take a look at it to see how to fetch navigation infos

           

          But if in your portlet, you only want to retrieve current context of navigation, you can use this https://community.jboss.org/wiki/GateInPortalNavigationalProperties

          • 2. Re: References to Navigation
            sonicaaaa

            Hi thanks for quick reply.

            Unlickily I am using JBoss EPP 5.2.1 that uses some old .jars so I could neither use getNavigations() nor the source of that method since it's again calling some methods I do not have access to.

             

            Any other tips?

             

            I am just trying to replicate the Navigation menu in another portlet template

            • 3. Re: References to Navigation
              antoine_h

              Hi,

               

              You have the Navigation Service, that is made to provide the Navigation infos.

              I don't remember exactly how to get it and use it, but there are some sample in the UIPortalNavigation and the UINavigationPortlet, and the corresponding .gtmpl files.

               

              May be the UINavigationPortlet is a better track to follow, to make another Menu portlet.

               

              I am doing this kind of change, right now, in a compagny : changing the navigation menu, so it appears as a "DroppeddownTabbed" menu, like for this : https://access.redhat.com/home

               

              It is not difficult.

              I'll try to make a wiki, when this custom menu is finished (with the design details etc...).

               

              Antoine

              Consultant Expert J2EE, JBoss AS7, JBoss Portal and GateIn (JSR-286), UXP, EPP5, JSF, Richfaces, PrimeFaces.

              • 4. Re: References to Navigation
                sonicaaaa

                Thank you Antoine but actually the code I have posted in the first post comes exactly from UIPortalNavigation .

                 

                In that class, the oject that provides the values I need, is already set and available through as the variable uicomponent.

                 

                I tried to read the util methods implementation found around but I have not been able to find the informations I need.

                 

                Do anyone have a working example?

                 

                EDIT:

                I am afraid I am facing the same exact scenario as here. I have to find a way to access the informations from code, that are exposes as REST services.

                 

                 

                thank you

                 

                paolo