6 Replies Latest reply: Mar 6, 2012 8:13 AM by Ayan6B RSS

    How to create left sided menu in Oracle ADF

    Ayan6B
      Hello Everybody,

      I am using Jdeveloper 11.1.1.5.0 and working in Oracle ADF. My requirement is to create a left sided menu.

      More specifically, I will have my links in the left panel which will be a static panel. On clicking a specific link it will render the page corresponding to the link in the right panel of the page and it should have the provision to navigate to other pages also but all the page contents should have to be refreshed in the right panel.

      Can someone please help me with some useful link or document in this regard.

      Thanks,
      Ayan
        • 1. Re: How to create left sided menu in Oracle ADF
          Timo Hahn
          Ayan,
          From your description you can use a panelGroupLayout set to vertical and just put any number of links into it. If this is not what you are trying to do, please elaborate on 'left sided menu'

          Timo
          • 2. Re: How to create left sided menu in Oracle ADF
            Ayan6B
            Hi Timo,

            Yes that can be done, a better way I found is using Panel Splitter layout. But actually my question was, is there any specific/standard ADF faces component like Menu Bar or Menu that can create left sided menu instead of top buttons.

            My requirement is to create a page that will have say 5 buttons/links on the left hand side and that will be a fixed part of the page.
            Clicking on each button/link will render its corresponding page in the right side of the fixed part.That means right side of the page will refresh on click of each button/link of the left sided panel.

            Thanks,
            Ayan
            • 3. Re: How to create left sided menu in Oracle ADF
              Karthic Rajha
              Hi

              You can use the tree component

              http://docs.oracle.com/cd/B25221_05/web.1013/e18745/devguide/tree.html


              To make the link navigate to different pages, refer the following link

              How to navigate to different pages on selecting adf tree subnodes?





              regards,
              KR
              • 4. Re: How to create left sided menu in Oracle ADF
                Shah
                Hi,
                I think you should use template for that.As you have said that it would be static then why don't you use the template.

                In the template, for leftsided navigation you can use the panelStrechLayout and then you can use the panelformlayout like this :-

                <af:panelStretchLayout id="pt_psl1" topHeight="120px" startWidth="250px"
                bottomHeight="5px" endWidth="5px">
                <f:facet name="center">
                <af:facetRef facetName="mCenter"/>
                </f:facet>
                <f:facet name="start">
                <af:panelGroupLayout id="panelGroupLayout1">

                <af:panelFormLayout id="panelFormLayout1" rows="5"
                maxColumns="1"
                inlineStyle="background-color:#E7E2BF; width:300px; background-image:url(&quot;images/LSide.PNG&quot;);Height:480px; "
                rendered="#{sessionScope.whichButton == 'orders' ? true : false}">
                <af:group id="group1">
                <af:spacer width="10" height="20" id="spacer1"/>
                <af:goMenuItem text="First Link" id="pt_gmi15"
                destination="First.jspx"
                targetFrame="_self"/>
                <af:goMenuItem text="Second link" id="goMenuItem10"
                destination="Second.jspx"
                targetFrame="_self"/>
                ...
                ...
                ...

                </af:group>

                After creating template.You can create your bounded taskflows like FirstTF.xml,SecondTF.xml which contains the fragments.
                Then include the Template and your bounded Taskflowas as region in your respective pages(jspx pages).

                Hope it helps..
                Thanks .
                Shah

                Edited by: Shah on Mar 3, 2012 10:47 AM
                • 5. Re: How to create left sided menu in Oracle ADF
                  Karthic Rajha
                  Hey

                  Nice tip bro!
                  Actually in our project we cannot hard-code values. It has to be fetched from the database where we cannot predict the number of menus and its number of sublevels.
                  Just like you have mentioned we also used the Template.



                  Thanks,
                  KR
                  • 6. Re: How to create left sided menu in Oracle ADF
                    Ayan6B
                    Hi,

                    Exactly, as I mentioned earlier, I know it can be done in many ways. I have tried with Standard Layouts and Panel Splitter also. That works fine. But thinking in more generalised way as mentioned by KR.

                    Menu and submenu items can change dynamically. I will try with those two links provided by KR and update accordingly.

                    And I am really sorry for not mentioning that dynamic behavior of Menu and submenu earlier which is creating a lot of problems.

                    Thanks everybody,

                    Ayan