To create menu based on Table:
CREATE TABLE MENUTREE
( CODE VARCHAR2(10),
PARENT VARCHAR2(10),
TYP CHAR(1), ----------- USER TYPE
NAME VARCHAR2(50),
ACTIVE CHAR(1), ------------ YES / NO
ADMIN CHAR(1), ------------ YES / NO
MENUTYP CHAR(1) DEFAULT '1', ---- TOP, MAIN AND SUB MENU
PERMISSION CHAR(1),
PAGEID VARCHAR2(10)
);
Copy the following code in menu creation:
select level,
NAME label,
decode(pageID, null, null, 'f?p=&APP_ID.:'||PAGEID||':&APP_SESSION.') as target,
'NO' is_current,
'>>' image
from MENUTREE
where ACTIVE='Y'
start with PARENT is null
connect by prior LTRIM(RTRIM(CODE))=LTRIM(RTRIM(PARENT))
order siblings by CODE;