Menu based on privileges

I want to generate a dynamic menu based on privileges at the login time in jsp...has any one implemented the same before?

try this...
cluster your menu items according to the privileges
<table name="menu">
<tr>
<%
    // Example on how to identify user's privilege/access right
    if (user.privilege == "admin")
%>
<td><a href="config.html">Configuration</a></td>
<td><a href="report.html">Report</a></td>
<td><a href="help.html">Help</a></td>
<%
    else if (user.privilege == "manager")
%>
<td><a href="report.html">Report</a></td>
<td><a href="help.html">Help</a></td>
<%
%>
</tr>
</table>

Similar Messages

  • Setting a specific menu based on exit point?

    Hello,
    Wondering how I should go about this...any feedback is appreciated.
    Basically, I have my main show setup with various chapters points. When a user hits the MENU or TITLE buttons from within the main show to return to the DVD menus, I would like to serve them a specific chapter menu based on the 2 chapter points the user may be between.
    Anyone have any ideas about how I should go about scripting this?
    Thanks in advance.

    Yes, you can do this if you use the info within SPRM7 that the DVD player stores automatically for you. SPRM7 tracks the last chapter played, in numbers from 1 to 99.
    If the viewer hits 'menu' between chapters 6 and 7, SPRM7 will hold a value of 6. You can use this info in a script which is what you set the menu call to go to. OFr example, in a three chapter track, your menu call would be to this script:
    mov GPRM0, SPRM7
    Jump Menu 1 If(GPRM0 = 1)
    Jump Menu 2 If(GPRM0 = 2)
    Jump Menu 3 If(GPRM0 = 3)
    and so on for all of the possible menus in your project.
    This will at least take you to the default button on each menu. If you want to go to a specific button then that script will need to be amended, or a second script added.

  • How do I display or hide a Java menu based on current url in a php page

    How do I display or hide a Javascript menu based on the current url in a php page?
    I want to specify when a java menu appears on a page based on the current url - does anyone have a script for the vars and conditional statements to make this happen - it would be something like this in natural language:
    <javascript>
    if currenturl = http://jemmakidd.com/categories.php
    then displaymenu
    else if currenturl = http://jemmakidd.com/categories.php?cat=14 (or 15,16 etc)
    then DONOTdisplaymenu
    What is needed is that, if you look at this page there is a java menu under the first category:
    http://jemmakidd.com/categories.php
    I WANT the menu to appear on that page so that is working, however if I look at one of the store categories, like on this page, I do NOT want the menu to appear - it may be that this can be done without using a java current url type function - thats why I'm asking...
    http://jemmakidd.com/categories.php?cat=14
    So to summarise:
    http://jemmakidd.com/categories.php (If this url is used DO display menu - if any other url DONT display menu)
    Thanks again...any ideas?
    Edited by: littlealex2009 on Jul 15, 2009 12:51 AM

    This is a Java forum, not a Javascript forum. Google the differences.
    kind regards,
    Jos

  • Using javascript to populate one menu based on the choice in another menu

    I have several menus which are dynamically populated (with PHP and MYSQL). The information is category based. How do I dynamically populate the second menu based on the choice the user makes in the first menu (without having to submit and refresh the page-- i.e. I need to use javascript instead of the server-side PHP).
    Example:
    Main Categories: 1) Numbers     2) Letters
    Sub Categories:        1                      a
                                   2                      b 
                                   3                      c
                                  etc.                  etc.
    the first menu contains the two main categories. I want the second list to be populated with only the sub categories of the main category the user chooses in the first menu (i.e. 1,2,3 etc. if he chose the main category 'Numbers' and a,b,c, etc. if he chose the main category 'Letters')
    Is there an easy way to do this in Dreamweaver?
    Thanks,
    YWSW

    How many items do you have in each dropdown? If it's a small number, you can download all of the options for the second dropdown and use client side javascript to filter based on the choice of the first dropdown. If the number is large, you'll need to use AJAX to dynamically pull the related items from the database.
    Search the web for "dependent dropdown" or "cascading dropdown" for some technical details.

  • Can you create a javascript dynamic menu based on security data in oracleDB

    I am looking for a dynamic javascript menu that is generated based on the user role... basically i get the user role from ldap and then I have a Security table in oracle data base that has the permission info and i want to generate my dynamic menu based on the data in the database table.... the table has the following columns
    private String userId;
    private String security_level; // page level , field level
    private String permission; //CRUD
    private String permissionType; //ALLOW, DENY

    Hello Suzie,
    It is possible but you have "many" ways to do it, since what will happen is the javascript will be generated by an application.
    Are you developing a J2EE application? with or without JSF?
    The best way will be to Google to find a good Javascript menu library, and adapt the generation of it based on the content of your database.
    Regards
    Tugdual Grall

  • Feature Request: Build Favourites Menu based on Directory Structure

    Hi
    SQL developer is really a very nice tool and even for DBAs. I would like to request a feature in this tool which would a good value to this tool and usability. Most of us have our own scripts which we keep on using to perform day to day activities, Can we have a feature which builds a menu based on the directory structure like one of the popular tools Benthic Software's "Golden" does? It would really be a very good feature to have.
    I love sql developer tool already..
    regards

    Better support for file based development is being working on for our 1.1 release.
    -kris

  • Skinning Menu based on XmlMenuModel

    I created a menu based on an XmlMenuModel, I want to skin that menu but I can't find the correct selectors in the designer.
    <af:gridRow marginTop="5px" marginBottom="5px" height="auto" id="menuGridRow">
                <af:gridCell marginStart="5px" marginEnd="5px" width="100%" id="pt_gc3">
                    <af:menuBar id="pt_mb1" value="#{root_menu}" var="item">
                        <f:facet name="nodeStamp">
                            <af:commandNavigationItem text="#{item.label}"
                                                      action="#{item.doAction}"
                                                      id="cni1"/>
                        </f:facet>
                    </af:menuBar>
                </af:gridCell>
    </af:gridRow>
    Here are the selectors I can't find:
    - The color of the arrow which is black by default
    - When the mouse is on one menu item at any level
    - The background color of the grid row menuGridRow
    JDev 11.1.2.4.0

    Hi,
    Add this line to your web.xml
    <context-param>
        <param-name>org.apache.myfaces.trinidad.DISABLE_CONTENT_COMPRESSION</param-name>
        <param-value>true</param-value>
      </context-param>
    Redeploy your application and then use firebug from mozilla or inspect element from chrome to see which classes are involved.
    This makes lot easier to identify which selector you need to change.
    Regards

  • Menu based-image to jump to a section in a second page

    Can you help me in establishing this.
    I have just established a menu based-image in flash in the
    main html page. Also I do have a second page has details on each
    option of the menu of the main page. I am trying to whenever I
    click on any option of the menu in the main page; this should take
    me to the specific section in the second page describing this
    option
    Thanks a lot

    no, use the frames on your main flash timeline. attach a
    stop() to the first frame. place on-stage whatever you want seen
    when your flash opens.
    if you want something else seen after a button is pressed,
    put that on a different frame (say a frame labeled option1). you
    can then attach to the frame that contains your button:

  • Changing from Menu Based to Auto Play

    How do I change from menu based to auto play when burning a project to DVD. It used to and some how it changed to menu based, and I wan autoplay. Thanks

    Gink
    The bottom line is at the end of this whole write up...
    Are you expecting to see a button, like in earlier versions, that specifically is labelled AutoPlay?
    If so, Premiere Elements 11 and 12 does not have such a button.
    Once you hit Reset, that resets back to the no menu stage which represents AutoPlay. In that state, when you click Done, your project has no menus and is classed as AutoPlay.
    Are you trying to get navigation of the DVD-VIDEO using the TV Remote and just the Timeline markers with no menus in the project? Or are you content to place your DVD-VIDEO on DVD disc in the DVD player and let it play out to completion without any TV Remote Navigation?
    I will stay with you on this until we figure out where we are differing in the discussion exchange.
    WAIT - Light bulb may have just lit...
    I think that I see where you are coming from on this. Is this it? Given that you have burned your Timeline to DVD-VIDEO as AutoPlay and that you go back into the program and decide to burn another "AutoPlay" DVD-VIDEO. You have long since click Done to the Movie Menu section.
    If you click Tools Menu/Movie Menu, you will be faced with menu choice which do not include an AutoPlay one.
    So what you can do instead, keep away from Tools Menu/Movie Menu, go directly to Publish+Share/Disc. In that process, you will be greeted by the following pop up
    Just click No and proceed with your burn to DVD-VIDEO on DVD disc.
    What that it?
    Looking forward to your reply.
    Thanks.
    ATR

  • Show/Hide DVT Admin Menu Based on Entitlements

    Hi,
    We're using the DVT framework provided in Weblogic Portal 10.3.2 to create My Page functionality within our portal project. Part of the requirement is to offer limited functionality to non-admin users.
    For example:
    Portal Level Customization Menu
    - Show/Hide based on entitlements (we tried setting an entitlement of the Main page Book, and that worked, however after that we were unable to see the Customize Menu for any child Books/Pages)
    - Limit entries based on entitlements
    Book Level Customization Menu
    - Limit menu entries based on entitlements
    - Restrict the ability to rename book based on entitlements
    Page Level Customization Menu
    - Limit menu entries based on entitlements
    - Restrict the ability to rename page based on entitlements
    Portlet Level Customization Menu
    - Limit menu entries based on entitlements
    - Restrict the ability to rename portlet based on entitlements
    We've been able to eliminate DVT functionality for entire Books and Pages based on entitlements, however we can't find a way to provide limited functionality as described above.
    Any suggestions on how to accomplish this?
    Thank you.

    Sorry about the confusion. What I meant was, I tested with both setting entitlement and DA roles (separately) and found that the usecase you are describing works. BTW, you are right in that only visitor entitlement roles effect dvt functionality. I just wanted to check if setting DA roles wasn't causing some undesirable behavior.
    Back to the issue you are having, I am assuming you are talking about setting a 'view' entitlement for 'role1' on the primary book and logging in as a user that is not in 'role1' but has 'edit' rights on a child page or book of the primary book. In that case you shouldn't be able to see anything since you don't have view rights to the main book. If that is not the case, can you provide details about your setup?
    Here is what I tested and found working. Set an 'edit' entitlement for 'role1' and a 'view' entitlement for 'role2' on the primary book. When logged in as a user from 'role2' I cannot see the 'Customize' gear icon on the primary book but I can see the gears on child books, pages and portlets. I tested the usecase with non-primary books and that works too.
    Thanks

  • Set DISPLAY ONLY based on privilege

    Hello. I'm using Apex 4.0. I'm trying to enable the Read Only function based on a Privilege assigned to a User. For instance, I have several users where their privilege is set to 'View' in the Access Control List. How do I code for this. On the "Read Only Condition Type" I've selected "Request = Expression 1". I've tried several Expressions like: Role = 'View'
    Thanks for your help.

    Hi Jari,
    Thanks for the response. It pointed me in the right direction. Since I created the Access Control based on the APEX template, the field names were a little bit different. Here's what worked for me:
    Select 1
    From APEX_ACCESS_CONTROL
    Where upper(ADMIN_USERNAME) = :APP_USER
    and ADMIN_PRIVILEGES = 'VIEW'
    Thanks again for your help.
    Edited by: PhilMan2 on Oct 17, 2010 4:11 PM

  • Display menu based on sharepoint user roles

    Hi,
    Could anybody please help me how to display custom navigation menu in sharepoint master page based on user roles
    Eg: supose the loggedin user belongs to approver group then it should display entire menu,
    if logged in user belongs to designer group it should hide some "ui item" (ex: Report)
    Thanks in advance
    Rasna

    Hello,
    If you are using sharepoint server/enterprise then you can also consider audience targetting for the links. You just need to enable publishing feature then set target audience from site action-->site settings-->navigation.
    See this to enable publishing feature:
    http://office.microsoft.com/en-in/sharepoint-server-help/enable-publishing-features-in-sharepoint-2010-HA010378243.aspx
    Hope it could help
    Hemendra: "Yesterday is just a memory,Tomorrow we may never see"
    Whenever you see a reply and if you think is helpful, click "Vote As Helpful"! And whenever
    you see a reply being an answer to the question of the thread, click "Mark As Answer
    Please feel free to unmark answer if does not resolves your problem.

  • Tree menu based on session variable?

    Hi all,
    is there somewhere a javascript or php or html (or extension)
    tree menu
    that will highlight the current branch based on a session (or
    cookies, at
    least) variable content?
    I cannot fint it anywhere.
    TIA
    tony

    hi Christian,
    Thanks for your help,
    Here is my situation, I have a fact table of very high volume, because of which reports are taking lot of time in displaying results. Recently I have been assigned one of these reports and asked to improve its performance. so, I thought to use a opaque view(thought to apply all the fact related reports filters into WHERE Clause using session variables which can bring down table volume) and then switch this table source with original fact table using 'dynamic' table under existing alias table definition with the help of session variable. The purpose of this table switch is, all existing reports will  source from original fact table, where as modified report will be sourcing from opaque view.
    I would like to try to your suggested approach "creating a placeholder column which contains the exact variable string content for the table source and the opaque view source respectively", but how does OBIEE switch priority of these LTS, can you please explain me this approach a bit further.
    Thanks,
    vijay

  • How can I show a pop up menu based on the selection in a previous pop up menu?

    For example, if "Company" is selected in a pop up menu in C6, then show another pop up menu in C7. if "Bob" is selected in a pop up menu C7, show another pop up menu that contains the talks "Bob" has in C8.
    I am trying to create a talk scheduling spreadsheet with different talk outlines for different speakers. I'm not sure if there are any functions or formulas that can accomplish this. Can anyone help?

    Pop-up menus contain fixed values in Numbers. You might be able to do this using Steppers or sliders. These produce a numerical result, which could be used to direct a second slider or stepper's output to a specific column or table.
    If you can provide a map of the structure of your list(s), there may be someone here able to take on the task of constructing the tools to do the job.
    Regards,
    Barry

  • Dynamically changing the functions in a menu based on the user (in SSHR)

    Dear All,
    I have a requirement to change the functions in a menu dynamically.
    For Ex: An employee is allowed to apply Advance only in the first one month of his/her joining. I created it as an EIT and attached the function, to the menu. Now, i want to remove it automatically from the menu if his/her term in the company crossed one month.
    Can any one tell me how to automatically disable it after one month.
    Thanks and Regards
    Raj
    Edited by: SuperStar_Krishna on Jul 5, 2010 12:22 AM

    The following code should do it. In this example, MyCellRenderer is the renderer class implementing TableCellRenderer, used for displaying combo box.
    TableCellRenderer renderer= new MyCellRenderer();
    (JComboBox)renderer.addActionListener(new ActionListener(){
        public void actionPerformed(ActionEvent e) {
            //Your event handling goes here
    });

Maybe you are looking for

  • How to develop a report in Crystal with flexible database name?

    Hello I am a Project Manager of a project of developing reports in Crystal 11. The idea is to develop reports on top of the content in MS SQL tables. The initial testing and demonstration to the customer is done within the Crystal development environ

  • Hi guys basic doubt

    Hi Guys, I have one doubt , sorry for giving trouble to all, my question is, I want to write my own html events like onclick, onchange, anyone knows how to write that things, becoz here i m getting small prob, problem is i have taken one text area, b

  • Battery is not charging - New Battery

    I have just bought a replacement battery as my old one reached the end of its life. After inserting the new battery and plugging in the charger, the message "Battery is not charging" appears when i click on the battery symbol. How do I set up my new

  • Equium U400/146 - I need a replacement lcd cable/ribbon

    Hello please help i have been searching for days. I need a replacement lcd cable/ribbon . id number (DDOBU2LC000) My laptop is the Toshiba Equium U400/146 model number PSU42E-00400SKS. Its out off warranty so i took it it to my local repare shop but

  • 60GB iPod making windows to CRASH

    Hi all, could someone please help me? I have a 60GB iPod video, and everything was fine until recently i found a problem where whenever i connect my iPod to my PC (winXP), windows will reboot and if i live it connected on reboot, winXP will reboot ag