?
Solved

how to create a dynamic menu with forms 6i?

Posted on 2003-03-12
5
Medium Priority
?
4,134 Views
Last Modified: 2008-02-26
hi,
   I am beginer of developer 2000.Now I have been created customised menus,that has contained three levels i.e main menu,sub menu & sub menu's sub menu.Now my question is how can I create the menu dynamically from one or more tables.How can I give access specified menus to individual user and disable remaining menu items.Then I would like the user to only see menu options that he/she can execute based on the roles he/she has.  Also, it needs to be easily maintainable so that I don't need to change the application's menus everytime a new option is added or deleted.
Could u please give proper solution but not using ROLES.It's better give me an example of dynamic menus that are table driven not use Oracle roles.  
This is an urgent.My work has been stop due to this.
Thanks.





0
Comment
Question by:zhangrui
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 15

Accepted Solution

by:
andrewst earned 100 total points
ID: 8118763
So you won't be using Forms Builder menus then - they cannot be built dynamically at runtime, and access is via ROLES.

I don't see how you are going to achieve this unless you don't mind your menus not looking like a standard Windows menu.  Building a data model for table-driven menus and user access rights is pretty simple - I can go into more details if necessary.

The problem is how to display that menu.  Again, it is easy enough if you don't mind it having a non-standard look and feel.  For example, you can use the tree-structure approach:

- Main Menu
  + Employee Menu
  - Manager Menu
    o Hire Employee
    o Fire Employee
  + Admin Menu

I am confused as to why you say:
a) "I would like the user to only see menu options that he/she can execute based on the roles he/she has", but
b) "Could u please give proper solution but not using ROLES"

Why re-invent the wheel?
 
0
 

Assisted Solution

by:sfardin
sfardin earned 100 total points
ID: 8118793
One approach is to create a table to contain all the users with menu name accessible to them. Write code in 'Start up code' of the menu to query users record and enable/disable them as per their rights.  But this requires to create all the menu/submenu and menu item in Menu. Altough this is a easy solution, it requires a bit of maintanence. FOr every new menu item , you need to add them in your mmb file and database.

Other approach is to create a table which will contain user_name, menu_name, parent_menu, module_type and access_path. Create a multiple record block form to query and display menu options avl for current user.  Either provide them with button or write 'When double click' triggger on this display item to call the corresponding module. for e.g.
a typical record in your table will have.
User_name Menu_name, Parent_menu module_type access_path
user123   Mfg reps   Core Mfg    Report      < act path with report name >

When user selects this option, a call like run_product (module_type, access_path ,...) is executed.

I hope i'm clear in explaining my point  
0
 

Author Comment

by:zhangrui
ID: 8123801
hi,andrewst:
 Thank you very much!The tree-structure is a good approach,but i only want a standard menu like powerbuilder's.the questions confused u are mean the menu item should be visible but greyed out if he/she only has the 'display' role not 'excute' role.Now i want to implement the menu with the following tables:
table menu_authority:
authority_code varchar2(2) not null/* the value like '00'
authority_type varchar2(20)/*value=administrator

table menu_classes:
menu_id number(2) not null
menu_label varchar2(20)
table menu_item:
item_class_id
item_id
item_lable
table menu_all

authority_code
item_id

0
 
LVL 13

Expert Comment

by:anand_2000v
ID: 10093929
No comment has been added lately, so it's time to clean up this TA.
I will leave the following recommendation for this question in the Cleanup topic area:

Split: andrewst {http:#8118763} & sfardin {http:#8118793}

Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

anand_2000v
EE Cleanup Volunteer
0

Featured Post

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Background In several of the companies I have worked for, I noticed that corporate reporting is off loaded from the production database and done mainly on a clone database which needs to be kept up to date daily by various means, be it a logical…
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
This video explains at a high level with the mandatory Oracle Memory processes are as well as touching on some of the more common optional ones.
Via a live example, show how to take different types of Oracle backups using RMAN.
Suggested Courses

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question