1 Reply Latest reply on Nov 7, 2015 9:07 PM by Jonchi

    How do I create a custom dynamic navigation bar menu in Apex 5.0.1?

    Ivan C

      Hi,

       

      I am trying to create a custom navigation bar menu in APEX 5.0.1 but I can't get the SQL query to work correctly.

       

      I have a table called NAVIGATION_BAR_ENTRIES:

       

      ENTRY_LABEL             VARCHAR2(60)

      TARGET                        VARCHAR2(512)

      TREE_LEVEL                NUMBER(2)

      PARENT_LABEL          VARCHAR2(30)

       

      My SQL query is:

       

      select tree_level  as "level",

             entry_label as "label",

             parent_label as "parent",

             'NO' as "is_currentList_entry",

             target as "target"

             from navigation_bar_entries

             start with parent_label is null

             connect by prior entry_label = parent_label

             order siblings by entry_label

       

      When I run this in SQL*Plus the results look correct to me.

       

           level label                              parent                        
      ---------- ------------------------------ ------------------------------
               1 Profile                                                      
               2 Change Password          Profile                       
               2 Log Out                          Profile                       
               2 User Profile                    Profile                       
               1 Useful Links                                                 
               2 OTN                              Useful Links                                                                                      
                                                                              

      However, in my application I get two navigation bar entries, "Profile" and "Useful Links" but under each I have siblings of "Change Password", "Log Out" and "User Profile" whereas under "Useful Links", I should only have  "OTN"

       

      I just can't see where my SQL Query is wrong.  Can anyone help?

       

      My database version is 12.1.0.1.7