Dynamic menu creation in JSP treating source as dynamic xml

Hi Everyone,
I have a XML file which is a dynamic one..It is generated from a tool..I need to parse that xml and generate a menu accordingly in a jsp.In menu the data to be displayed comes from thie hierarchical xml file which is a dynamic one..Siblings and child notes are not fixed..it all generates at rum by some other tool.
Please help me to tell any logic to create such a dynamic menu ...i am using Dom parser to parse that..
Regards
Sajal

Hi
This is the xml...I want to display the values in a JSP menu..These values comes from this XML...Like for this XML the struscture will be like
--Category
|
| IT Services
|
|ABC Softwares
|
|Application Developement
|
|Java
|Mainframes
|Production Support
<DIMENSIONS>
<DIMENSION NAME="CATEGORY">
<DIMENSION_NODE>
<DVAL>
<DVAL_ID ID="1"/>
<VALUE>IT Services</VALUE>
</DVAL>
<DIMENSION_NODE>
<DVAL>
<DVAL_ID ID="2"/>
<VALUE>ABC Softwares</VALUE>
</DVAL>
<DIMENSION_NODE>
<DVAL>
<DVAL_ID ID="3"/>
<VALUE>Application Development</VALUE>
</DVAL>
<DIMENSION_NODE>
<DVAL>
<DVAL_ID ID="4"/>
<VALUE>Java</VALUE>
</DVAL>
</DIMENSION_NODE>
<DIMENSION_NODE>
<DVAL>
<DVAL_ID ID="5"/>
<VALUE>Mainframes</VALUE>
</DVAL>
</DIMENSION_NODE>
</DIMENSION_NODE>
<DIMENSION_NODE>
<DVAL>
<DVAL_ID ID="6"/>
<VALUE>Production SUpport</VALUE>
</DVAL>
</DIMENSION_NODE>
</DIMENSION_NODE>
<DIMENSION_NODE>
<DVAL>
<DVAL_ID ID="7"/>
<VALUE>DEF Softwares</VALUE>
</DVAL>
<DIMENSION_NODE>
<DVAL>
<DVAL_ID ID="8"/>
<VALUE>Application Development</VALUE>
</DVAL>
</DIMENSION_NODE>
<DIMENSION_NODE>
<DVAL>
<DVAL_ID ID="9"/>
<VALUE>Production SUpport</VALUE>
</DVAL>
</DIMENSION_NODE>
</DIMENSION_NODE>
</DIMENSION_NODE>
</DIMENSION>
</DIMENSIONS>
So in this way i need to populate the data from XML.. there can be n number of nodes child nodes and Siblings..and siblings can also have further Child nodes...So need to populate the JSP Menu from this xml..
Please suggest some logic or if somebody has some sample code..

Similar Messages

  • ADF - managed bean error in dynamic menu creation

    scenario:
    to create dynamic menu for two tabs : general..
    general has a subtabmenu in form of menubar wid items: country, city,...
    i created dynamic menus for my application.wen i ran my page i got this error:
    SEVERE: Managedbean menuItem_General could not be created Can't get value from value binding expression:
    '#{resources['erms.menu.gen']}'
    (erms.menu.gen is an entry in UIResources.properties)
    now, i followed the exact same process as mentioned in the SRDemo application, in adfdevguide!
    double checked that
    i. resource adapter is configured in faces-config.
    ii.menu model and menuTreeModel are configured with thier default adapaters in faces-config.
    iii.resource bundle specified in jsp page.
    can sum1 plz refer
    1.wat is the reason of this error? wat are the things dat shud hold true in order to run these dynamic menu? which files shud
    b specified where?
    2. in wat order are the managedbeans created ?
    is it in order they apprear in faces-config file or in order they are used in the jsp page?
    3: is it possible that u click on a menuTab item and it displays its particular menubar's items while staying on the same page? or
    u click on a menubar item and it displays its particular dropdowns while staying on the same page?
    is it posible wid ADF or javascript shud b used?

    Hi,
    looking at code it seems that you are adding textview and inputfield. please check in debugging if the correct context node/attribute  is being created and you are providing its reference while adding UI elements.
    Thanks,
    Chandra

  • Please help with dynamic menu creation needs to have 5 levels

    Hi,
    I have run into a Coldfusion problem that I was hoping you
    could help me with.
    What I am trying to solve is the dynamic creation of at least
    5 levels of categories for a menu built with Coldfusion, and if
    possible an infinite amount of levels.
    Each of these also if it is at the end of the tree will have
    to have products under it aswell the category will only show up if
    there is products under it.
    To acomplish this I have created a database table called
    "Categories" which contains the fields shown in the linked
    spreadsheet. I am using the "cat_parent" to hold the value of the
    parent of the current record. When the parent is a top level menu
    item I have assigned this a cat_parent id of "0". Using this method
    I am able to do a self join on the table (where "cat_parent" =
    "cat_id") to extract the relationship between parent and child
    records throughout the table. This works fine. And I have created
    output for 5 levels of display.
    There are 3 issues left that I could not work out.
    - Firstly my coding method loops through each node of the
    tree with one query to create each category of the menu. This means
    one query per menu category and as the client could have up to 200
    categories in the menu and I am concerned that the solution that I
    have come up with is too processor intensive.
    - Secondly the way that I have created the category menu is
    hard coding in the levels needed so there is only 5 not an infinite
    amount which would be preferable but is not essential.
    - Finally I could not work out how to not create "parents" in
    the tree if there is no products for the end child category.
    Meaning that if there is for example a category > subcategory
    > subsubcategory but there is no products associated with the
    end category - "subsubsubcategory" then it's parent and so on will
    not display until one of them has products.
    Here
    is a link to a zip file that includes: the cfc that contains
    the query function (categories.cfc), the page that is creating the
    categories menu (lefnav.cfm), a simple cfc that contains a products
    query just for testing (products.cfc) along with a spreadsheet of
    the Categories table's fields.
    I would greatly appreciate any suggestions.
    Thanks for any time and help you can give me on this

    This should at least get you started in the right direction.
    http://www.sitepoint.com/article/dynamic-menu-coldfusion
    Bryan Ashcraft (remove brain to reply)
    Web Application Developer
    Wright Medical Technologies, Inc.
    =============================
    Macromedia Certified Dreamweaver Developer
    Adobe Community Expert (DW) ::
    http://www.macromedia.com/go/team
    "shunnyboy" <[email protected]> wrote in
    message
    news:e2h9hs$kp5$[email protected]..
    > Hi,
    >
    > I have run into a Coldfusion problem that I was hoping
    you could help me
    > with.
    >
    > What I am trying to solve is the dynamic creation of at
    least 5 levels of
    > categories for a menu built with Coldfusion, and if
    possible an infinite
    > amount
    > of levels.

  • Dynamic Menu Creation Problem

    Hi,
    I am trying to implement a dynamic JSF menu, by coding for it in a request bean, and have hit a stumbling block with regards to adding a panelMenu to another panelMenu. I understand how to add outputLink and outputText to the menu and even how to add another panelMenu to the menu.
    Here is the code:
    HtmlPanelMenu panelMenu = new HtmlPanelMenu();
    panelMenu.setId("menuMain");
    panelMenu.setStyleClass("panelMenu");
    HtmlPanelMenu subMenu = new HtmlPanelMenu();
    subMenu.setId("subMenu");
    HtmlOutputText text1 = new HtmlOutputText();
    text1.setValue("Enquiry Menu");
    text1.setId("text1");
    subMenu.getChildren().add(text1);
    HtmlOutputLinkEx outputLink1 = new HtmlOutputLinkEx();
    outputLink1.setId("link1");
    outputLink1.setValue("enquiry.faces");
    HtmlOutputText text2 = new HtmlOutputText();
    text2.setId("authoritiesLinkText");
    text2.setValue("Branch Enquiry");
    outputLink1.getChildren().add(text2);
    subMenu.getChildren().add(outputLink1);
    panelMenu.getChildren().add(subMenu);When I try to run the page I get the following error:
    javax.servlet.ServletException: nested menu's require a menu owner - some item that is contained in a f:facet with name = "header"
    This is running on Websphere v7. I can see from the specification that the outputText for the submenu (text1) should have a surrounding facet, but I cannot find such an object anywhere. I have tried using FacetTag but this doesn't work as it hasn't got a children property to attach the outputText to it.
    Am I missing something or is it that this is the wrong way?
    Any help would be appreciated!
    Steve
    Edited by: Steve-Waterfall on Oct 22, 2009 1:37 PM
    Edited by: Steve-Waterfall on Oct 22, 2009 1:38 PM

    Ahhh you were nearly there
    try
    HtmlPanelMenu panelMenu = new HtmlPanelMenu();
    panelMenu.setId("menuMain");
    panelMenu.setStyleClass("panelMenu");
    HtmlPanelMenu subMenu = new HtmlPanelMenu();
    subMenu.setId("subMenu");
    HtmlOutputText text1 = new HtmlOutputText();
    text1.setValue("Enquiry Menu");
    text1.setId("text1");
    here is the key
    subMenu.getFacets().put("header",text1);
    HtmlOutputLinkEx outputLink1 = new HtmlOutputLinkEx();
    outputLink1.setId("link1");
    outputLink1.setValue("enquiry.faces");
    HtmlOutputText text2 = new HtmlOutputText();
    text2.setId("authoritiesLinkText");
    text2.setValue("Branch Enquiry");
    outputLink1.getChildren().add(text2);
    subMenu.getChildren().add(outputLink1);
    panelMenu.getChildren().add(subMenu);

  • DYNAMIC TABLE CREATION USING JSP

    I WANT TO CREATE A DATABASE TABLE IN AN INTERACTIVE WAY ie MY QUESTION IS: HOW TO CREATE A TABLE USING JSP WITH TWO ARRAYS(FIRST ARRAY CONTAINS FIELD(COLUMN) NAMES AND THE SECOND ARRAY CONTAINS ITS CORRESPONDING DATATYPE)BOTH ARRAYS ARE OF VARYING SIZE.IF THE USER ENTERS SUPPOSE '6' AS THE INPUT TO FORM A TABLE OF 6 FIELDS SO, THE QUERY SHOULD BE DYNAMICALLY FORME USING THE ARRAY NAME FOR FIELD AND THE ARRANAME FOR ITS CORRESPONDING DATATYPE.HAVE ANY IDEA ON THIS PLEASE LET ME KNOW.
    THANKS

    u need to know quite a few java technologies to make archieve your dream.
    JDBC, dynamic array and JSP.
    after reading tutorial regarding to these 3 materials, you should be able to get your job done.

  • Dynamic Tree Creation using JSP, Struts framework

    I urgently require tips/information/code snippet for creating a Dynamic Tree structure.
    Tree is the hierarchical folder structure that we see in windows operating system.
    Dynamic tree in the sense that all nodes shall be populated from database & a radio button shall be present at each node that can be selected & submitted to form.
    Tree should be done using JSP (& if required Javascript).
    I am using Struts framework .
    [email protected]

    u need to know quite a few java technologies to make archieve your dream.
    JDBC, dynamic array and JSP.
    after reading tutorial regarding to these 3 materials, you should be able to get your job done.

  • Dynamic GIF Creation thru JSP

    Hi All,
    I am able to create .bmp file by using the following code.But I need to create a GIF instead of BMP.
    The code follows as
    <%
    BufferedImage image =new BufferedImage(1000,1000,BufferedImage.TYPE_INT_RGB);
    Graphics graphics = image.getGraphics();
    graphics.setColor(Color.black);
    graphics.fillRect(0,0,1000,1000);
    graphics.setColor(Color.red);
    graphics.setFont(new Font("arial",80,80));
    graphics.drawLine(20,980,980,980);//Horizontal Line
    graphics.drawLine(100,20,100,990);//Vertical Line
    graphics.dispose();
    ServletOutputStream sos = response.getOutputStream();
    JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(sos);
    encoder.encode(image);
    %>
    How can I create GIF file.Please help me.
    Thanks in advance.

    You may want to have a look at this...
    http://www.acme.com/java/software/Acme.JPM.Encoders.GifEncoder.html

  • Dynamic Menu in JSP

    Hi,
    I have to make a menu just like www.staple.com in my JSP. The main product category and sub-category are read from the database. I have classes written which retrieve the product and sub categories but dont know hot to proceed with building of dynamic menu in my JSP. Please let me know how to move forward for this one.
    Thanks

    Hi,
    I tried to do something like this :
    *******CODE*******
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
         "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <%@taglib uri="/struts-tags" prefix="s"%>
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
    <head>
         <style type="text/css">
         body {
              font-family: arial, helvetica, serif;
         #nav, #nav ul { /* all lists */
              padding: 0;
              margin: 0;
              list-style: none;
              float : left;
              width : 11em;
         #nav li { /* all list items */
              position : relative;
              float : left;
              line-height : 1.25em;
              margin-bottom : -1px;
              width: 11em;
         #nav li ul { /* second-level lists */
              position : absolute;
              left: -999em;
              margin-left : 11.05em;
              margin-top : -1.35em;
         #nav li ul ul { /* third-and-above-level lists */
              left: -999em;
         #nav li a {
              width: 11em;
              w\idth : 10em;
              display : block;
              color : black;
              font-weight : bold;
              text-decoration : none;
              background-color : white;
              border : 1px solid black;
              padding : 0 0.5em;
         #nav li a:hover {
              color : white;
              background-color : black;
         #nav li:hover ul ul, #nav li:hover ul ul ul, #nav li.sfhover ul ul, #nav li.sfhover ul ul ul {
              left: -999em;
         #nav li:hover ul, #nav li li:hover ul, #nav li li li:hover ul, #nav li.sfhover ul, #nav li li.sfhover ul, #nav li li li.sfhover ul { /* lists nested under hovered list items */
              left: auto;
         #content {
              margin-left : 12em;
    </style>
    <script type="text/javascript">
    sfHover = function() {
         var sfEls = document.getElementById("nav").getElementsByTagName("LI");
         for (var i=0; i<sfEls.length; i++) {
              sfEls.onmouseover=function() {
                   this.className+=" sfhover";
              sfEls[i].onmouseout=function() {
                   this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
    if (window.attachEvent) window.attachEvent("onload", sfHover);
    //--><!]]></script>
    </head>
    <body>
    <ul id="nav">
         <s:iterator value="productList" id="products">     
                   <li> <s:url id="getProductCategoryCodesURL" action="listProductCategoryCodesByProductCd">
                                                      <s:param name="productCd" value="%{productCd}"></s:param>
                                                 </s:url>                                              
                                                 <s:a href="%{getProductCategoryCodesURL}" ><s:property value="productNm" /></s:a>
                                                 <input type="hidden" id="prodCd" value="<s:property value="productCd" />"/>
                             </li>
    </s:iterator>
    </ul>
    </body>
    </html>
    ****END CODE******
    So i was able to get the product categories in the menu but on mouse hover for a particular product category it should show sub-categories also. I can't think of a way to do that , can anyone please suggest ?

  • Properties - automatic menu creation

    Hi there,
    I'm currently working on a project that is frequently being changed and therefore I require a method to facilitate the creation of its menu.
    I am hoping to use a properties file to describe the contents of the menu and also which Actions each menu item will use.
    Does anyone out there have any code that exhibits this sort of behaviour, since I am having a bit of trouble in creating a robust system to do this; currently I have:
    a Properties file such as:
    # start of properties file
    menus = file edit # all of the menus
    menuitems = open open_recent save new global_options # the menu items
    file.children = open open_recent save new # the menu items of the file menu
    edit.children = global_options # the menu items of the edit menu
    open.text = Open # the text to appear on the menu item
    open.action = OpenAction # there is a class called OpenAction which provides the behaviour of this menu item
    open.gif = open.gif # the icon gif file for this menu item
    # .. now do the same for each other menu item
    # end of properties file
    Now in the source code I iterate through this file and store all of the menus and menu items in a hash table. Using the menu.children bit above I add the relationships of menu items (or other menus) to the menus. Then I add the text, action, and gif to the menu items.
    However, this way kind of works but is quite long winded; also it bumps into problems whenever I add menus to menus.
    If some one out there has previously done this before and are willing to share their code with me I would be ever so grateful. Else any suggestions would be extremely well received.
    thanks in advance
    - Edd.

    What we are using for dynamic menu creation is XML.
    Something Like:
    <Menu name="Setup">
      <MenuItem name="Security" class="com.epservices.apps.security.Security" args="" />
      <MenuItem name="Parent Company" class="com.epservices.apps.parentco.ParentCompany" args="" />
      <MenuItem name="Company" class="com.epservices.apps.company.Company" args="" />
    </Menu>
    <Menu name="Tax Set up">
      <MenuItem name="Tax Authority" class="com.epservices.apps.taxauthority.TaxAuthority" args="" />
      <MenuItem name="Tax Form" class="com.epservices.apps.taxform.TaxForm" args="" />
      <MenuItem name="Tax Code" class="com.epservices.apps.taxcode.TaxCode" args="" />
    </Menu>Then we simply parse it using SAX and build the structure.
    Here's a great article on mapping XML to Java objects:
    http://developer.java.sun.com/developer/technicalArticles/xml/mapping/

  • Dynamic menu in tree structure in JSP

    Hi,
    1) I need to display a dynamic menu in JSP. The menu depends on the values received from database. I need to show the items in the structure of tree (like parents, child relation). The tree can have multiple levels (the parent can have children & these children too can have children). This tree structure would be on left side of the screen.
    I would like to use some custom tags rather than javascript. Can somebody post the custom tags or some samples?
    2) Also, once the user selects different items from menu, different action classes should be called. And accordingly, the right side of the screen will show different data.
    So, there should be any way to set different action classes for the menu items. Please post any samples or helpful links.

    Hi,
    1) I need to display a dynamic menu in JSP. The menu depends on the values received from database. I need to show the items in the structure of tree (like parents, child relation). The tree can have multiple levels (the parent can have children & these children too can have children). This tree structure would be on left side of the screen.
    I would like to use some custom tags rather than javascript. Can somebody post the custom tags or some samples?
    2) Also, once the user selects different items from menu, different action classes should be called. And accordingly, the right side of the screen will show different data.
    So, there should be any way to set different action classes for the menu items. Please post any samples or helpful links.

  • How we can generate dynamic menu in jsp page

    Hi all,
    how we can generate dynamic menu in jsp page.
    Thanks
    Manjinder

    by reading more about them on the web or in a good book, OR BY HIRING SOMEBODY TO DO SO. ;)

  • Make a dynamic menu using JSP or Javascript

    Hi ,
    I am trying to make a dynamic menu that is using data retrieved from database in the form of a list.
    I have a javascript to make a tree structure menu, but i need to iterate through the list i am reciveing from the database to make the tree structure. here is the code :-
    <Please reply ASAP as my deadline is near>
    <Note:- in javascript to make static menu ul tag is used to make the parent node and li tag is use to make the child node>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <SCRIPT LANGUAGE="JavaScript" SRC="mktree.js"></SCRIPT>
    <LINK REL="stylesheet" HREF="mktree.css">
    </head>
    <body>
    <%@ page import = "java.util.ArrayList, java.util.Iterator, java.util.List, \WEB-INF\classes\DO_JSP.class,
    \WEB-INF\classes\Url_Name.class, java.util.Comparator, java.util.TreeSet, \WEB-INF\classes\MyComp.class" %>
    <%
         class Url_Name {
         String linkName;
         String linkUrl;
         int order;
         * @return the order
         public int getOrder() {
              return order;
         * @param order the order to set
         public void setOrder(int order) {
              this.order = order;
         * @return the linkName
         public String getLinkName() {
              return linkName;
         * @param linkName the linkName to set
         public void setLinkName(String linkName) {
              this.linkName = linkName;
         * @return the linkUrl
         public String getLinkUrl() {
              return linkUrl;
         * @param linkUrl the linkUrl to set
         public void setLinkUrl(String linkUrl) {
              this.linkUrl = linkUrl;
    class MyComp implements Comparator{
         public int compare(Object a, Object b){
              return (((Url_Name)a).getOrder() - ((Url_Name)b).getOrder());
         class DO_JSP
         int parentId;
         String parentName;
         TreeSet linkList;
         Url_Name tempurl;
         * @return the linkList
         DO_JSP(){
              linkList = new TreeSet(new MyComp());
         public TreeSet getLinkList() {
              return linkList;
         * @param linkList the linkList to set
         public void setLinkList(String linkName, String linkUrl, int order) {
              tempurl = new Url_Name();
              tempurl.setLinkName(linkName);
              tempurl.setLinkUrl(linkUrl);
              tempurl.setOrder(order);
              this.linkList.add(tempurl);
         * @return the parentName
         public String getParentName() {
              return parentName;
         * @param parentName the parentName to set
         public void setParentName(String parentName) {
              this.parentName = parentName;
         * @return the parentId
         public int getParentId() {
              return parentId;
         * @param parentId the parentId to set
         public void setParentId(int parentId) {
              this.parentId = parentId;
    %>
    <%
              List listdojsp =new ArrayList();
              listdojsp = (List)session.getAttribute("JspListName");
              Iterator it = listdojsp.iterator();
              do
    %>
              <%
              DO_JSP tempdojsp = (DO_JSP)it.next();
              String Parent = tempdojsp.getParentName();
              %>
              <ul class="mktree">     
              <li> Parent </li>
                   <ul>
              <%
              Iterator ittemp = tempdojsp.getLinkList().iterator();
                   do
                        Url_Name tempurlname = new Url_Name();
                        tempurlname = (Url_Name)ittemp.next();
                        String link = tempurlname.getLinkName();
              %>
                        <li>link</li>
              <%
                   }while(ittemp.hasNext());
              %>
                   </ul>
                   </ul>          
              <%     
              }while(it.hasNext());
              %>
    </body>
    </html>

    Hi ,
    I am trying to make a dynamic menu that is using data
    retrieved from database in the form of a list.
    I have a javascript to make a tree structure menu,
    but i need to iterate through the list i am reciveing
    from the database to make the tree structure. here is
    the code :- Hi, do you have a question? This is more of a "Look what I wrote" sort of post, and you don't seem to be asking for any specific advice. Please tell us what problem you're having, or the error message you're receiving.
    Brian

  • JSF - CREATING A DYNAMIC MENU - STEP BY STEP TUTORIAL

    Hi,
    Is there a step by step tutorial in Jdeveloper(10.1.3) that will help me with the creation of a Dynamic Menu. I have read the write up on "How to Create Dynamic Menus" and I understand that this tells you what is needed. What I am looking for is a Tutorial that will direct me to the different Palette/facets in Jdeveloper that will enable me to build a Dynamic menu.
    Regards
    Kes

    HI!
    Have you read the ADF Developer Guide yet? It has a chapter which explains how to work with menus. Also, you can take a look at SRDemo application (used in the book) and you will see how to implement a dynamic menu.
    I'm working on a large application which relies on that menu model and it works fine. We just made some mods in order to pick menu items and their corresponding navigation links from the database.
    You can find the book at http://www.oracle.com/technology/products/adf/learnadf.html#book
    For the SRDemo source code, just fire "Check for updates" from inside JDeveloper.
    Hope this helps.
    Regards,
    Gustavo

  • How to add a dynamic menu to the Portal?

    Dear all,
    I am restructuring the company's Intranet on which I plan to put a left-side vertical menu. On the menu, most links are accessible to all Intranet users except some KPI (key performance indicators) links which are only accessible to managers.
    I am evaluating a third-party dynamic menu builder so called "Sothink DHTML Menu" which is javascript based and provides features for connecting to database via JDBC in jsp.
    For static menu scenario, "Sothink DHTML Menu" is perfect for Oracle Portal in the sense of easy development and deployment.
    For dynamic menu scenario, if I really want to use "Sothink DHTML Menu", I need to put the codes in jsp file and then place the jsp file on the Portal page. Here is the tutorial http://www.sothink.com/product/dhtmlmenu/store/jspdb/jspdb.htm
    I still can't figure out how to do that. Can any experts here tell me how or suggest other alternatives for generating a dynamic menu on Portal?
    Thanks
    George (HK)

    Hi
    I also use SoThink menus in Oracle Portal, but for static menus (I upload them in the HtDocs of Apache and then refer to them with an URL Item).
    In my previous version of Portal I also had to display some kind of dynamic menus, some parts should only be visible to some users/groups. But I didn't use Sothink at this moment but "DHTML Menus" from an other company.
    Starting from an example and using their libraries I wrote my own menu in javascript. In this .js I wrote some functions
    - 1 that document.write(s) the start of the menu and the public part of the menu
    - 1 that document.write(s) the reserved part of the menu
    - 1 that document.write(s) the last part of the menu.
    Then in a navigation page I defined 3 regions, each region contains some jscript code that launchs the function/menu part of the same range. And I used the item level security to set right access to the second region/menu part.
    It worked fine, I just had to add some /* at the end of region 1 ent */ at the beginning of region 2 to remove the HTML code Portal writes between the regions.
    But it was very time consuming if your menu changes often.

  • Drop down dynamic menu

    Hi all. Please could you help with why this isn't working? I'm trying to create a navigation bar that links to my database, specifically I want to show all guitar bodies (drawn from mysql) on a drop down menu when the user hovers over Guitars on the top menu. I've downloaded something called Chrome CSS Drop Down Menu from http://www.empoweradvertising.com/36/dynamic-css-mysql-website-menus.html to do this. It's correctly showing the horizontal main menu items via the first part of the code below, but when I hover over 'Guitars' nothing happens. Am I missing something from the second part of the code? And is this a good way to do a dynamic nav bar or is there something else you'd recommend? Many thanks.
    <div class="chromestyle" id="chromemenu">
    <ul>
    <?php do { ?>
    <li><a href="<?php echo $row_rs_menuitems['link']; ?>"><?php echo $row_rs_menuitems['menuitem']; ?></a></li>
    <?php } while ($row_rs_menuitems = mysql_fetch_assoc($rs_menuitems)); ?>
    </ul>
    </div>
    <!--1st drop down menu -->                                                  
    <div id="dropmenu1" class="dropmenudiv">
    <?php do { ?>
    <a href="<?php echo $row_rs_bodies['link']; ?>"><?php echo $row_rs_bodies['name']; ?></a>
    <?php } while ($row_rs_bodies = mysql_fetch_assoc($rs_bodies)); ?>
    </div>

    This is a very helpful execellent sample code.
    However, If I'm using Model-View-Control approach, then what's the way of applying these codes
    to each indivisual file? Say, I have 20 files and only 4 of the 20 need to be treated as they like
    to have drop down menu in particular column(s)??? How could the custom tag be applied as the
    controller tells the view to present these special treat? or it is not possible (I have to treat each
    file, filtered by controller -- one by one as it encounters the special need)?
    Thx, Tzae

Maybe you are looking for