Friday, April 10, 2020

Dynamic menu in oracle apex

Create table tree_menu (
  parent_node integer,
  child_node integer,
  menu_desc varchar2(50),
  menu_type varchar2(20),
  page_no integer,
icon_img  varchar2(100)
);


Alter Table Tree_Menu add constraint pk_treemenu
primary key (menu_type, parent_node);


select     level,
        menu_desc as label,
        decode(page_no, null, null, 'f?p=&APP_ID.:'||"PAGE_NO"||':&APP_SESSION.')  as target,
'NO' is_current,
                   icon_img as image
            --decode(page_no, null, 'fa-folder-o', 'fa-file-text') as image
   from (select menu_desc,
parent_node,
child_node,
page_no,
icon_img ,
menu_type
from TREE_MENU T where menu_type = 'HOME')
  start with child_node is null
connect by prior parent_node = child_node
union all
select     level,
        menu_desc as label,
        decode(page_no, null, null, 'f?p=&APP_ID.:'||"PAGE_NO"||':&APP_SESSION.')  as target,
'NO' is_current,
          icon_img as image
        --decode(page_no, null, 'fa-folder-o', 'fa-file-text') as image
   from (select menu_desc,
parent_node,
child_node,
page_no,
icon_img ,
menu_type
from TREE_MENU T where menu_type = 'MAIN')
  start with child_node is null
connect by prior parent_node = child_node


No comments:

Post a Comment

How to install and configure Oracle Apex 24.1 with ORDS 22, Tomcat 9 and Jasper Report 7 on Oracle Linux 8.10

#########################Install Oracle  APEX 24.1################################ ----------------------------------------------------...