Dynamic Menu Selected Class

Hey everyone,
On the site I am working on here http://sunsweetuk.wsiefusion.net/ you can see right away the "About Us" menu item has the selected class turned on, even though it isn't the selected page.
If you go to this page: http://sunsweetuk.wsiefusion.net/sunsweet-story you can see it turns off...However if you select any menu item after About Us the About Us item keeps the "selected" class turned on.
I cannot quite figure out what is going on here. I do have 'flexnav' js added onto this site, as it is responsive. Any help would be appreciated. Thanks.
Regards, Brian Richards

Fixed this myself. Thanks.

Similar Messages

  • Taking Action on Dynamic Menu Selection

    How do i get an action to take place when a menu item is
    selected from a dynamic menu? I want to move to a specific record
    item in my database based on the selection in the dynamic menu. Can
    anyone help?

    Thanks anyway. I'm sorry that Apple didn't include a "repeat" keyboard shortcut - going to the Inspector and then the actions wheel and then "delete row" time after time wasn't fun.
    I'm afraid I failed to communicate well about outline format - I didn't mean a bulleted or numbered list, I do know how to do that, but rather making a single character (or in my particular interest a symbol, the diamond and heart suit symbols) appear in outline text format. You can do it by going to format->font->outline, but if I want to do it for several occurrences of the same thing (or a few different things), it's not much fun to do it that way. But maybe I can define a character format that's outline and that will work. Still would prefer to have a keyboard shortcut to apply the character format though.
    Incidentally, while I'm talking about diamonds and hearts, is there any way to change the amount of space that gets put in after the diamond and heart symbols if you insert them using Edit->Special Characters? I write a lot of documents that use those symbols and lines end up unevenly spaced because of the large amount of space below each symbol (I've figured out a partial work-around - I defined a style for "body after suit symbol" that is raised enough to get the line spacing right, but that only works when I want to have a hard return at the end of the line with the suit symbols, since if the lines wrap, both lines have to have the same paragraph formatting. This problem isn't really Pages related - I have the same difficult with Word .

  • How to display content dynamically base on the menu selection?

    I have only one XML file to populate my menus and display the
    content base on the menu selection.
    If I select anything by name on the menus, example Math all
    the the Math products will display on the dsFeatures region.
    I use istinctOnLoad: true, distinctFieldsOnLoad:['name']
    function to remove duplicate rows from the data set when it loads.
    So far so good.
    Once I try to select from the grades menu this does not
    display anything.
    I'll need to dynamically change the dsFeatures.setPath when I
    click on the menus some how.
    dsFeatures.setXPath("products/product[grade =
    '"+???+"']/features/feature");
    Below is my code.
    XML used to create the menus and the display the content.
    <products>
    <product>
    <name>Math</name>
    <category>Life Math</category>
    <grade type="grade">Grade 6 - 8</grade>
    <subject>Life Math Grade 6 - 8</subject>
    <image>images/math_icon.png</image>
    </product>
    <product>
    <name>Math</name>
    <category>Division</category>
    <grade type="grade">Grade 5</grade>
    <subject>Life Math Grade 5</subject>
    <image>images/math_icon.png</image>
    </product>
    <product>
    <name>Science</name>
    <category>Life Math</category>
    <grade type="grade">Grade 6 - 8</grade>
    <subject>Life Science Grade 6 - 8</subject>
    <image>images/science_icon.png</image>
    </product>
    <product>
    <name>Social Studies</name>
    <category>Studies</category>
    <grade type="grade">Grade 5</grade>
    <subject>Social Studies Life Grade 5</subject>
    <image>images/social_icon.png</image>
    </product>
    <product>
    <name>Language Arts</name>
    <category>Life Arts</category>
    <grade type="grade">Grade 3 - 4</grade>
    <subject>Life ArtsGrade 3 - 4</subject>
    <image>images/language_icon.png</image>
    </product>
    </products>
    // Get all the products data and use distinct() to filter the
    names.
    var dsProducts = new
    Spry.Data.XMLDataSet("included/d_products.xml",
    "/products/product", { useCache: false, distinctOnLoad: true,
    distinctFieldsOnLoad:['name']});
    // Get the menu by grade using distinct()
    var dsByGrade = new Spry.Data.XMLDataSet(null,
    "/products/product/grade", { useCache: false, distinctOnLoad: true,
    sortOnLoad: "grade", distinctFieldsOnLoad:['grade'] });
    // Create the dsFeatures data set, pass a null for the URL
    parameter so that it doesn't load
    var dsFeatures = new Spry.Data.XMLDataSet(null,
    "/products/product[name = '{dsProducts::name}']/features/feature",
    { useCache: false });
    // Define a function that to register as an observer on
    dsProducts.
    function updateCategoriesAndFeatures(notificationType,
    notifier, data)
    // Interested in "onPostLoad" notifications.
    // If it is any other notification, just bail.
    if (notificationType != "onCurrentRowChanged" &&
    notificationType != "onPostLoad")
    return;
    // Received an "onPostLoad" or "onCurrentRowChanged
    notification
    // from dsProducts! Ask it for its XML document. If it has
    one, tell
    // dsFeatures to extract its data from that document.
    var doc = dsProducts.getDocument();
    if (doc)
    if (notificationType == "onPostLoad")
    dsByGrade.setDataFromDoc(doc);
    dsFeatures.setDataFromDoc(doc);
    // Register the function as an observer on dsProducts.
    dsProducts.addObserver(updateCategoriesAndFeatures);
    Menus:
    Display by names:
    <ul spry:region="dsProducts" id="nameRegion">
    <li class="product" spry:repeat="dsProducts"
    spry:setrow="dsProducts" spry:select="selected" spry:hover="hover"
    >{name}</li>
    </ul>
    Display by grades:
    <ul spry:region="dsByGrade" id="gradeRegion">
    <li class="grade " spry:repeat="dsByGrade"
    spry:setrow="dsByGrade" spry:select="selected" spry:hover="hover"
    >{grade}</li>
    </ul>
    Content.
    Display the features content:
    <ul spry:region="dsFeatures">
    <li spry:repeat="dsFeatures">{subject} <br />
    {image}</li>
    </ul>
    Any idea on how to go about this or pointer to an example
    would be appreciated.
    ~Cheers

    Does anybody have idea?

  • 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.

  • Mars Version: Problems with Dynamic menu contribution

    I create an "Eclipse 4 Application project" called test with Luna and Mars version.
    In my Application I add a Dynamic Menu Item called ToTo with the following code:
    Quote:
    package test.handlers;
    import java.util.Date;
    import java.util.List;
    import org.eclipse.e4.ui.di.AboutToShow;
    import org.eclipse.e4.ui.di.AboutToHide;
    import org.eclipse.e4.ui.model.application.ui.menu.MDirectMenuItem;
    import org.eclipse.e4.ui.model.application.ui.menu.MMenuElement;
    import org.eclipse.e4.ui.model.application.ui.menu.MMenuFactory;
    public class Toto {
    @AboutToShow
    public void aboutToShow(List<MMenuElement> items) {
    MDirectMenuItem dynamicItem = MMenuFactory.INSTANCE.createDirectMenuItem();
    dynamicItem.setLabel("Dynamic Menu Item (" + new Date() + ")");
    dynamicItem.setContributorURI("platform:/test/");
    dynamicItem.setContributionURI("bundleclass://test/test.handlers.DirectMenu");
    items.add(dynamicItem);
    @AboutToHide
    public void aboutToHide(List<MMenuElement> items) {
    And the following code for the DirectMenu:
    Quote:
    package test.handlers;
    import org.eclipse.e4.core.di.annotations.Execute;
    public class DirectMenu {
    @Execute
    public void execute() {
    System.out.println("Direct Menu Item selected");
    With Luna version when I click on the menu Item I have the date and the execute part is OK
    With Mars the item is here with the date, but when I click the execute is never executed?????
    Can you help me!!!
    Regards
    Antonio

    Dirk Fauth wrote on Fri, 03 July 2015 10:11It is not that easy to integrate the correction. You would need to copy the MenuManagerRenderer code to a local class and use the patched MenuManagerHideProcessor in that class. Than register the modified MenuManagerRenderer in the context so it is used instead of the default one.
    So you need to get the code of MenuManagerRenderer out of the platform code, then the MenuManagerHideProcessor from Gerrit and you need to know how to replace the renderer. For the last there should be a tutorial by Lars Vogel somewhere.
    Of course you should also vote for the posted ticket, to increase the visibility.
    Hello Dirk,
    could you please describe in more detail a way how to get this workaround working on Mars? Matt Biggs mentioned similar thing in bug report id=469581 but I don't know how to make it work.
    I've created a class called MenuManagerHideProcessor with a patch from git. I don't know how to do second part (registration). I read Lars article about renderers at vogella page. (Eclipse4Renderer) and found a property "CUSTOM_RENDERER_URI". I did following in @AboutToShow method:
    MDirectMenuItem directMenuItem = MMenuFactory.INSTANCE.createDirectMenuItem();
    directMenuItem.getPersistedState().put("CUSTOM_RENDERER_URI", MENU_MANAGER_URI);
    directMenuItem.setLabel(view.getLabel());
    directMenuItem.setContributionURI(SHOW_HANDLER);
    It seems that this is not the way how it should be done.
    Thank You for any insights
    PS: Sorry I couldn't post a direct links to bug tracker and vogella site because of "You can only use links to eclipse.org sites while you have fewer than 5 messages".

  • Change the nav item selected class name

    Hi there,
    In moduleTemplates > Menu > Default > container.html
    The function call to set the selected nav menu iten does not have a parramater to set the class name :
    // this will set the selected state
        if ((null !== ulTagId) && ("" !== ulTagId)) {
            catSetSelectedCSSItem(ulTagId);
    So you can not pass a parramater to set the dynamicly generated class name of the "selected" li
    So is the any other way to have the selected class name be "iAmSelected" for example.
    I dont yet see any way to edit the system file where the function resides : CatalystScripts/Java_DynMenusSelectedCSS.js
    Kind regards
    Gary

    Hi Gary,
    When using
    http://forums.adobe.com/docs/DOC-1903
    You can delete it and add your own script.
    OR the easier thing is adapt your CSS to match the class.

  • Dynamic List Selection as a Parameter in another Recordset

    Please help.
    I have an ASP VBScript webpage. The first field on this page
    is a dynamic menu / list which lists footballers from a recordset.
    Whichever player is selected I then want to populate additional
    fields on the page (e.g. team he plays for) based on the selection.
    I was trying to extract the field value to a variable MM_Var6
    = Cstr(Request.Form(("PlayerName2")) and then use MM_Var6 in the
    WHERE statement of an additional recordset e.g. WHERE
    Teams.Playername = MM_Var6
    but can't help feeling there has to be an easier way of
    getting the data from the table rather than using an additional
    recordset. The above way doesn't seem to extract the value
    correctly from the list field.
    Am I just using the wrong syntax? or is there a better way of
    doing this?
    Can someone please point me in the right direction? Thanks,
    Chris.

    Try below:
    http://blogs.msdn.com/b/jackiebo/archive/2007/02/27/displaying-a-list-on-another-site-in-the-same-site-collection.aspx
    http://sharepointgeorge.com/2009/display-sharepoint-list-site-data-view-web-part/
    http://sharepoint.stackexchange.com/questions/37140/display-list-or-library-on-another-site-as-webpart
    http://stackoverflow.com/questions/938580/showing-the-list-view-web-part-for-a-list-in-another-site

  • Dynamic bandwidth selection for PPPoE over Ethernet/VLAN

    Hello all, hope you are doing great.
    I'm planning to deploy PPPoE Server (Cisco Router 7609) for a ISP. This ISP will provide Internet connection for customer over Ethernet.
    I have to provide a solution to assign bandwidth to each customer by RADIUS and I find some clues that Dynamic Bandwidth Selection (DBS) should be the answer. Unfortunately, DBS only support PPPoA or PPPoE over ATM.
    If you have any experience with equivalent function, please help me. Thank you very much.
    Regards,
    Hiep Nguyen.

    Hiep,
    I think I have figured this out.  Here is the test config on my PPPoE server:
    int lo1
      ip address 172.25.25.25 255.255.255.255
    ip radius source-interface Loopback1
    aaa new-model
    radius-server host 172.16.1.55 auth-port 1812 acct-port 1813 key cisco$$$
    aaa group server radius RADIUS-ACT
     server 172.16.1.55 auth-port 1812 acct-port 1813  
    aaa authentication login default group RADIUS-ACT local
    aaa authorization exec default group RADIUS-ACT local
    aaa accounting exec default start-stop group RADIUS-ACT
    aaa accounting delay-start
    aaa authentication ppp default if-needed group RADIUS-ACT local
    aaa authorization network default group RADIUS-ACT local
    aaa accounting network default start-stop group RADIUS-ACT
    aaa accounting update periodic 5
    bba-group pppoe global
     virtual-template 1
    interface fa0/1
     pppoe enable group global
     ip address 172.30.0.1 255.255.0.0
     no shut
    interface Virtual-Template1
     mtu 1492
     ip unnumbered FastEthernet0/1
     peer default ip address pool GLOBALPOOL
     ppp authentication chap
    ip local pool GLOBALPOOL 172.30.0.2 172.30.127.255
    policy-map POLICE-128K
     class class-default
        police 128000
    policy-map POLICE-512K
     class class-default
        police 512000
    Here are the attributes on the radius server, for a group the PPPoE customer belonged to:
    Service-Type = Framed
    Framed-Protocol = PPP
    cisco-avpair="ip:sub-policy-In=POLICE-128K"
    cisco-avpair+="ip:sub-policy-Out=POLICE-512K"
    Here is the show policy-map on the virtual-access interface the client connected on:
    sho policy-map int virtual-a 3
     Virtual-Access3
      Service-policy input: POLICE-128K
        Class-map: class-default (match-any)
          1000 packets, 1402000 bytes
          5 minute offered rate 0 bps, drop rate 0 bps
          Match: any
          police:
              cir 128000 bps, bc 4000 bytes
            conformed 799 packets, 1120198 bytes; actions:
              transmit
            exceeded 201 packets, 281802 bytes; actions:
              drop
            conformed 0 bps, exceed 0 bps
      Service-policy output: POLICE-512K
        Class-map: class-default (match-any)
          911 packets, 1137746 bytes
          5 minute offered rate 0 bps, drop rate 0 bps
          Match: any
          police:
              cir 512000 bps, bc 16000 bytes
            conformed 799 packets, 1136178 bytes; actions:
              transmit
            exceeded 0 packets, 0 bytes; actions:
              drop
            conformed 0 bps, exceed 0 bps
    I was able to generate enough traffic with ping to meet the exceed action in and have it drop packets.

  • Dynamic menu problem when chaning from english to arabic language

    Hi all,
          am working on Dynamic Menu its working fine in English when i convert this same menu in Arabic its working fine but the sub menu has some margin...if we set the margin then again for 2nd main menus submenu  is not coming
    in order...
    www.dreamcom.ae   (This is for english working good)
    www.dreamcom.ae/Ar/Index.aspx (This is for Arabic which is not working)
    <div class="wrap">
    <div class="content_wrap menucss">
    <%-- CssClass="menubar" --%>
    <asp:Menu ID="menuBar" StaticEnableDefaultPopOutImage="False" runat="server" Orientation="Horizontal"
    onmenuitemclick="menuBar_MenuItemClick" DynamicHorizontalOffset="2" Font-Size="18px"
    BackColor="#669903" ForeColor="White" StaticSubMenuIndent="100%" Font-Bold="True" Height="56px" vertical-align="top" top="50px"
    margin="0px" position="static" BorderStyle="None" DynamicSelectedStyle-BorderStyle="None" BorderColor="#7ab802" CssClass="menucss">
    <DynamicHoverStyle BorderStyle="Solid" BorderWidth="0px" BackColor="#7ab802" ForeColor="White" />
    <%--below single line is for sub menu --%>
    <DynamicMenuItemStyle BorderColor="Black" BorderStyle="Solid" BorderWidth="0px" Font-Bold="true" Font-Size="17px" HorizontalPadding="6px" VerticalPadding="6px" />
    <%--below single line is for sub menu colour,border --%>
    <DynamicMenuStyle BorderColor="#669903" BorderStyle="Solid" BorderWidth="1px" BackColor="#669903" CssClass="menucss"/>
    <DynamicSelectedStyle BorderColor="#3094FC" BorderStyle="Solid" BorderWidth="0px" ForeColor="#3094FC" BackColor="#5D7B9D" CssClass="menucss" />
    <%--below single line is for mouse over on main menu and mouse over on sub menu --%>
    <StaticHoverStyle BorderColor="#669903" BorderStyle="Solid" BorderWidth="0px" BackColor="#7ab802" ForeColor="#ffffff" CssClass="menucss" />
    <StaticMenuItemStyle ForeColor="White" BorderStyle="Solid" BorderWidth="0px" Font-Size="14px" HorizontalPadding="15px" VerticalPadding="20px" CssClass="menucss" />
    <%--below single line is for sub menu on mouse over --%>
    <StaticSelectedStyle BorderColor="#5CB8FF" BorderStyle="Solid" BorderWidth="1px" ForeColor="#fafafa" BackColor="#5CB8FF" />
    </asp:Menu>
    </div>
    </div>
    this code am using in both english and in arabic.....but in arabic am using style="direction:rtl;" hence it the direction of the content will change...
    and am fetching english and arabic datas are fetch from database..
    Kindly help me out...am trying from long time..
    Thanks.

    Hi,
    This is a ASP.NET question so I think you need to submit the question at:
    http://forums.asp.net/

  • Adding a dynamic menu to a template

    Can somebody tell me what I'm doing wrong please?
    I have created a menu, I want to add it to a template (this template already has a dynamic menu which I added to it by the way, in case it's important to the answer).
    I have selected the Template and have it ready to edit or do whatever next to it.
    I thought the next step was to select "add modules to Template" and then I would get a panel appear on th right hand side with further options to select the menu I want and then go through the insert proceedure.
    But nothing happens when I click on "add modules to Template".
    I already have one menu on the page, I've done it once already, but for some reason it's not working any more. Or have I just completely forgotten what the correct steps are.
    Yes I have researched and googled but I keep getting answers that just tell me how to create a menu or modify a template, or something other than what I need to know.
    Cheers for any help.
    Grant

    Okaaaaaaaaaaaaaaaaaaaaaaaaaay. So now it's working.
    So if you experience the same problem, here's what happened and how I resolved the problem.
    I closed the browser, started up again and tried adding a menu to a page using "Add   modules to a web page" - it worked, but then BC still wouldn't let me have access to the "Add   modules to Templates" button a second time when I tried it with the template - just wouldn't work. So, I shut the browser again but this time loaded the template and tried adding the the module to the template using the button, and it worked.
    So I'm guessing that this is a bug that needs to be sorted Adobe?

  • 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 ?

  • 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

  • Dynamic Menu error when saving to Crystal Reports Server R2 & Developer XI

    Hi All
    Product Version 11.5.9.1076
    In Crystal Reports XI developer I installed SP 4 the other day and when I save a report to the reporting server it seems to corrupt the dynamic menu when we open the report in the info view page the first selection in the cascading menu is OK but when I select items from the first menu it is just populating the second select box with what I selected in the first box
    I have it set to multiple
    If I run the report in the developer the menu selection work OK ?
    Also is any one else having a problem in the developer when selecting a date in using the calendar?
    The error is file://C:\Documents and Settings\simon hardstaff\Local Settings\Temp\prompting1.html
    Many thanks for any support given

    Just to update
    SP4 CR XI R2 seems to be changing some Date Parameters from Date to DateTime has any one else installed SP4 and using CR Server ?

  • File Upload/Menu Select Option

    I have a form that needs to have a combination of a file
    upload or a menu select option. The client I have been
    working with wants to use an insert form to insert a new
    record. If the file that they want doesn't have the filename
    their looking for in the menu list, they want to use the
    option of uploading a file. I'm having trouble combining the
    processing script for this and was wondering if anyone can
    help me put this together; it's an interesting challenge.
    PHP:
    $editFormAction = $_SERVER['PHP_SELF'];
    if (isset($_SERVER['QUERY_STRING'])) {
    $editFormAction .= "?" .
    htmlentities($_SERVER['QUERY_STRING']);
    if ((isset($_POST["MM_insert"])) &&
    ($_POST["MM_insert"] ==
    "form1")) {
    define('UPLOAD_DIR', '../../photos/staff/');
    $file = str_replace(' ', '_',
    $_FILES['staff_photo']['name']);
    $permitted = array('image/gif', 'image/jpeg',
    'image/pjpeg', 'image/png');
    $typeOK = false;
    foreach ($permitted as $type) {
    if ($type == $_FILES['staff_photo']['type']) {
    $typeOK = true;
    break;
    if ($typeOK) {
    switch($_FILES['staff_photo']['error']) {
    case 0:
    if (!file_exists(UPLOAD_DIR.$file)) {
    $success =
    move_uploaded_file($_FILES['staff_photo']['name'],
    UPLOAD_DIR.$file);
    if ($success) {
    $insertSQL = sprintf("INSERT INTO staff (staff_name,
    staff_position, staff_subposition, staff_desc, staff_photo,
    staff_spec_1, staff_spec_2, staff_spec_3, staff_spec_4,
    staff_spec_5) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s,
    %s)",
    GetSQLValueString($_POST['staff_name'], "text"),
    GetSQLValueString($_POST['staff_position'], "text"),
    GetSQLValueString($_POST['staff_subposition'], "text"),
    GetSQLValueString($_POST['staff_desc'], "text"),
    GetSQLValueString($_POST['staff_photo'], "text"),
    GetSQLValueString($_POST['staff_spec_1'], "text"),
    GetSQLValueString($_POST['staff_spec_2'], "text"),
    GetSQLValueString($_POST['staff_spec_3'], "text"),
    GetSQLValueString($_POST['staff_spec_4'], "text"),
    GetSQLValueString($_POST['staff_spec_5'], "text"));
    mysql_select_db($database_wvgsadmin, $wvgsadmin);
    $Result1 = mysql_query($insertSQL, $wvgsadmin) or
    die(mysql_error());
    if ($Result1) {
    $insertGoTo = "staff_list.php";
    if (isset($_SERVER['QUERY_STRING'])) {
    $insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
    $insertGoTo .= $_SERVER['QUERY_STRING'];
    header(sprintf("Location: %s", $insertGoTo));
    } else {
    $result = "Error uploading $file. Please try again.";
    break;
    case 3:
    $result = "Error uploading $file. Please try again.";
    default:
    $result = "System error uploading $file. Contact
    webmaster.";
    } else {
    $result = "$file cannot be uploaded. Acceptable file
    type: .gif, .jpf, .png";
    HTML FORM:
    <form method="post" name="form1"
    enctype="multipart/form-data" action="<?php echo
    $editFormAction; ?>">
    <table width="80%" align="center" cellspacing="0"
    border="0">
    <tr valign="baseline">
    <td nowrap align="right">Select Photo:</td>
    <td><select name="staff_photo">
    <option selected="selected"></option>
    <?php buildImageList('../../photos/staff/'); ?>
    </select>
    <span class="small">   (If
    there is no photo
    available, please choose 'No-Phot-Available.jpg' or 'No
    photo')</span></td>
    </tr>
    <tr valign="baseline">
    <td nowrap align="right">Upload Photo: </td>
    <td><input name="staff_photo" type="file" />
    </td>
    </tr>
    <tr valign="baseline">
    <td nowrap align="right"> </td>
    <td><input type="submit" value="Insert
    record"></td>
    </tr>
    </table>
    <input type="hidden" name="MM_insert" value="form1">
    <input name="staff_photo" type="hidden" id="staff_photo"
    />
    </form>

    In this case, I think you might need to
    1) Create a transient attribute in the VO.
    2) Either create a method in AM to get the file id based on the attachment entity name/id(using PL/SQL) and set the view attribute accordingly
    or call a PL/SQL procedure to get the file id in the getter method of the transient attribute.
    Look at this forum entry to get the file id.
    How to display Attachments on OAF page for different entities
    Regards,
    Peddi.

  • Problems with recordset paging and dynamic menu displaying all the options

    Hi hope someone can help on this - I've posted the code on the FoEd Backend Blight - with no takers/success yet -
    I've created a jobs page using DWCS3 which has a dynamic drop down menu filtering the 'countries' that jobs are located in.  When I introduce a recordset page only those countries associated with the jobs on that particular page are shown in the dynamic menu above, not all of the countries listed in the database. When I get to the second page of results - again - only those jobs' countries are shown in the menu (and not the previous pages/next pages as well).
    I'd clearly like a user to be able to select from the menu of countries available for all the jobs in the database, and not just those on the page.  Any ideas?
    On a similar strain - my country menu/filter is wrapped up in a form above the list of jobs.  On loading the page, only the search and menus appear.  No jobs are shown until I hit submit.  Is there a way to have all the jobs display on first load, and then for the search/menu filter to work on the displayed jobs. I've tried altering the variables on the search to 1 from -1, and other options but I can't seem to get a page of content on first load.
    I'd really appreciate any pointers on the above, as this would help solve the final stage of my project. The full post and code can be seen on the friendsofed website under backend blight.
    Many thanks in advance.
    Matt

    I'm still stuck on getting the page to load with some actual content, however.  I'm just getting the search box and country filter displaying on first load.
    Pages 584-6 explain why you get nothing when a page first loads. Dreamweaver sets the default value to -1. The problem with trying to change the default value even to an empty string or % is that Dreamweaver's security function, GetSQLValueString() changes an empty string to NULL and wraps % in quotes, so neither will work.
    One way to display all records when the page first loads is to create another recordset that selects all records. Wrap the code in a conditional statement that checks whether the $_GET array contains any values:
    if (!$_GET) {
      // recordset to retrieve all records here
    This means that you need two repeat regions to display the results. Wrap both of them in conditional statements:
    if (isset($fullRecordsetName)) {
      // display the full recordset
    } elseif (isset($searchResultsRecordsetName)) {
      // display the search results
    You also need to wrap the mysql_free_result() statements in conditional statements at the end of the page:
    if (isset($fullRecordsetName)) mysql_free_result($fullRecordsetName);
    if (isset($searchResultsRecordsetName)) mysql_free_result($searchResultsRecordsetName);
    Another way to do it is to use just one recordset, but split the SQL query into two sections:
    $query_RecordsetName = "SELECT * FROM myTable";
    if (isset($_GET['searchTerm')) {
    $query_RecordsetName .= sprintf(" WHERE searchTerm LIKE %s",
         GetSQLValueString("%" . $colname_RecordsetName . "%", "text"));
    This uses the combined concatenation operator to add the WHERE clause to the query only if $_GET['searchTerm'] has been set. Notice that you need a space before the "WHERE".

Maybe you are looking for

  • Can't find audio book at itunes store

    I've downloaded the first 6 Harry Potter books but haven't seen book 7 (Harry Potter and the Deathly Hallows) in the itunes store. Am I missing it or is it not available from the itunes store?

  • The dreaded ? and folder icon

    I recently won quite a few macs from an auction from public school district, emacs and imacs from 2001-2004 range. For security of course all the drives were cleared. I am quite experienced on pc's as I am a technician at our local cable company, but

  • How to create a table dynamically

    Hello All, I want to create a table dynamically in DDIC. I know that there is function module exist DB_CREATE_TABLE but i am getting some errors while using it. Could any please post some code for it. Regards, Lisa

  • Web service in OSB

    Hi All, I am brand new to OSB, i was giving a schema to develop a web service with in OSB. How do i start? what are the steps? Please help its urgent.

  • Setting the time in CIMC

    Newbie question.. but how do I set the time in CIMC?