/ #APEX #PLSQL 

How to Create Dynamic Navigation Menu in Oracle APEX

How to Create Dynamic Navigation Menu in Oracle APEX

Preview Sometimes user don’t want to go with a default navigation menu then on those cases will go ahead with a dynamic navigation menu so today I will let you know how you can create a dynamic navigation menu.

  • Create a table with following this SQL script:
CREATE TABLE  "NAVIGATION_MASTER"
   ("LEVEL" VARCHAR2(100),
    "NAV_NAME" VARCHAR2(100),
    "PAGE_NO" VARCHAR2(100),
    "PARENT_ID" NUMBER,
    "NAV_ID" NUMBER,
    "ICON_IMG" VARCHAR2(50)
   )
/
  • Create a Name “Custom Navigation” and Choose the type Dynamic. Define Navigation Name
  • Copy and Paste the following SQL script:
select
    LEVEL "level",
    NAV_NAME "label",
    decode( connect_by_isleaf, 0, '','f?p=&APP_ID.:'
	    	|| TO_CHAR(PAGE_NO) 
	    	|| ':&SESSION.:::::' 
	    	) target,
    'YES' as is_current,
    decode(nvl(ICON_IMG, 'A'), 'A', '', ICON_IMG) image
from
    NAVIGATION_MASTER
start with
    PARENT_ID is null
connect by
    prior NAV_ID = PARENT_ID 
    order siblings by NAV_NAME desc 

Navigation SQL Script

  • Go to Shared Components»User Interfaces then Change Navigation Menu List from Desktop Navigation menu to “Custom Navigation” which I have created. Assign to Custom Navigation

  • Create a form on apex page with a default process based on the table “Navigation_Master”. Apex Form based on Table

  • Now Enjoy! you can create your own navigation menu directly from pages.

Demo

You might like: