<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    DANCE WITH JAVA

    開發(fā)出高質(zhì)量的系統(tǒng)

    常用鏈接

    統(tǒng)計(jì)

    積分與排名

    好友之家

    最新評(píng)論

    struts-menu(list-menu樣式和treemenu樣式)

    在上篇文章的基礎(chǔ)上。新建一個(gè)jsp文件listmenu.jsp內(nèi)容如下

    <%@ include file="/common/header.jsp"%>

    <script type="text/javascript" src="./scripts/coolmenus3.js"></script>
    <script type="text/javascript" src="./scripts/coolmenu-config.js"></script>

    <menu:useMenuDisplayer name="CoolMenu" bundle="org.apache.struts.action.MESSAGE">
        
    <menu:displayMenu name="ToDoListMenuFile"/>
        
    <menu:displayMenu name="ToDoListMenuEdit"/>
        
    <menu:displayMenu name="CaseDetailMenuCase"/>
    </menu:useMenuDisplayer>

    <%@ include file="/common/footer.jsp"%>

    然后在menu-conmfig.xml的menus之間加入如下內(nèi)容

    <!-- ====================   To Do List Menus   =========================== -->
        
    <Menu  name="ToDoListMenuFile"  title="FILE"  description="test" width="50">
           
    <Item   name="TDLnew"   title="NEW">
               
    <Item   name="TDLnewcase"   title="CASE"    image="images/case-new.png"
                       location
    ="NewCase.jsp"/>
               
    <Item   name="TDLnewitem"    title="ITEM"   image="images/item-new.png"
                       location
    ="index.jsp"/>
               
    <Item   name="TDLnewparty"   title="PARTY"  image="images/party-new.png"
                       location
    ="index.jsp"/>
           
    </Item>
           
    <Item   name="TDLopen"   title="OPEN">
               
    <Item   name="TDLopencase"    title="CASE"   image="images/case-open.png"
                        location
    ="index.jsp"/>
               
    <Item   name="TDLopenitem"   title="ITEM"    image="images/item-open.png"
                        location
    ="index.jsp"/>
               
    <Item   name="TDLopenparty"  title="PARTY"   image="images/party-open.png"
                        location
    ="index.jsp"/>
           
    </Item>
           
    <Item    name="TDLexit"  title="EXIT"
                    image
    ="images/exit.png"   location="index.jsp"/>
        
    </Menu>

        
    <Menu  name="ToDoListMenuEdit"  title="EDIT">
             
    <Item  name="TDLselect" title="SELECT_ALL"       image="images/select-all.png"
                        location
    ="index.jsp" width="100" />
             
    <Item  name="TDLprefs"  title="USER_PREFERENCES" image="images/prefs.png"
                        location
    ="index.jsp" width="150" />
        
    </Menu>

        
    <!-- CASE -->
        
    <Menu  name="CaseDetailMenuCase"   title="CASE">
             
    <Item  name="CDadd"    title="ADD">
                  
    <Item   name="CDaddparty"    title="PARTY"      image="images/party-add.png"/>
                  
    <Item   name="CDadditem"     title="ITEM"       image="images/item-add.png"/>
                  
    <Item   name="CDaddcomments" title="COMMENTS"   image="images/comments.png"/>
                  
    <Item   name="CDadddoc"      title="DOCUMENTS"  image="images/documents.png"/>
                  
    <Item   name="CDaddposition" title="POSITION"   image="images/positions.png"/>
             
    </Item>
             
    <Item  name="CDopen"   title="OPEN">
                  
    <Item   name="CDopenparty"    title="PARTY"      image="images/party-open.png"/>
                  
    <Item   name="CDopenitem"     title="ITEM"       image="images/item-open.png"/>
                  
    <Item   name="CDopencomments" title="COMMENTS"   image="images/comments.png"/>
                  
    <Item   name="CDopendoc"      title="DOCUMENTS"  image="images/documents.png"/>
                  
    <Item   name="CDopenposition" title="POSITION"   image="images/positions.png"/>
                  
    <Item   name="CDopenhistory"  title="HISTORY"    image="images/history.png"/>
             
    </Item>
             
    <Item  name="CDassign"    title="ASSIGN"           image="images/assign.png"/>
             
    <Item  name="CDactivate"  title="ACTIVATE"         image="images/activate.png"/>
             
    <Item  name="CDpublish"   title="PUBLISH"          image="images/case-pub.png"/>
             
    <Item  name="CDescalate"  title="ESCALATE"         image="images/escalate.png"/>
             
    <Item  name="CDdecide"    title="DECIDE"           image="images/decide.png"/>
             
    <Item  name="CDgenlicen"  title="GENERATE_LICENSE" image="images/genlicense.png"/>
        
    </Menu>

    在主頁(yè)上點(diǎn)擊coolmenu example就進(jìn)入了listmenu的畫面。如下


    繼續(xù)復(fù)用listmenu的配置文件,只新建一個(gè)jsp文件velocity-xtree.jsp內(nèi)容如下

    <%@ include file="/taglibs.jsp"%>

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
        
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
        
    <title>XTree (with Velocity) Example</title>

        
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

        
    <link rel="stylesheet" type="text/css" media="screen"
            href
    ="styles/global.css" />
        
    <link rel="stylesheet" type="text/css" media="screen"
            href
    ="styles/xtree.css" />
        
    <style type="text/css">
        div.container 
    {
            position: absolute;
            width: 200px;
            top: 0px;
            left: 0px;
            height: 
    100%;
            padding: 5px;
            overflow: auto;
        }

        
    </style>
        
    <script type="text/javascript" src="scripts/xtree.js"></script>

    </head>
    <body>

    <div class="container">
    <script type="text/javascript">
    <menu:useMenuDisplayer name="Velocity" config="/templates/xtree.html"
      bundle
    ="org.apache.struts.action.MESSAGE">
    if (document.getElementById) {
        
    <menu:displayMenu name="ToDoListMenuFile"/>
        
    <menu:displayMenu name="ToDoListMenuEdit"/>
        
    <menu:displayMenu name="CaseDetailMenuCase"/>
    }
     else {
      var msg 
    = "Your browser does not support document.getElementById().\n";
        msg 
    += "You must use a modern browser for this menu.";
      alert(msg);
    }

    </menu:useMenuDisplayer>
    </script>
    </div>

    <div id="content" style="margin-left: 150px">
    The homepage 
    for this menu is <a href="http://webfx.eae.net/dhtml/xtree/index.html">http://webfx.eae.net/dhtml/xtree/index.html</a>.
    Please refer to this site and it's support system for any menu-specific questions. 
    </div>

    <div id="pageSource">
    <strong>Files used in this page:</strong><br />
    - <a href="templates/xtree.html.src">templates/xtree.html</a>
        
    <a href="templates/xtree.html" 
            title
    ="Right click and 'Save Target As' to download">
            
    <img src="images/download.gif" 
            
    class="download" alt="download"/></a><br />
    - <a href="styles/xtree.css.src">styles/xtree.css</a>
        
    <a href="styles/xtree.css" 
            title
    ="Right click and 'Save Target As' to download">
            
    <img src="images/download.gif" 
            
    class="download" alt="download"/></a><br />
    - <a href="scripts/xtree.js.src">scripts/xtree.js</a>
        
    <a href="scripts/xtree.js" 
            title
    ="Right click and 'Save Target As' to download">
            
    <img src="images/download.gif" 
            
    class="download" alt="download"/></a><br />
    - <a href="images/foldericon.png">images/foldericon.png</a><br />
    - <a href="images/openfoldericon.png">images/openfoldericon.png</a><br />
    - <a href="images/foldericon.png">images/foldericon.png</a><br />
    - <a href="images/file.png">images/file.png</a><br />
    - <a href="images/I.png">images/I.png</a><br />
    - <a href="images/L.png">images/L.png</a><br />
    - <a href="images/Lminus.png">images/Lminus.png</a><br />
    - <a href="images/Lplus.png">images/Lplus.png</a><br />
    - <a href="images/T.png">images/T.png</a><br />
    - <a href="images/Tminus.png">images/Tminus.png</a><br />
    - <a href="images/Tplus.png">images/Tplus.png</a><br />
    - <a href="images/blank.png">images/blank.png</a><br />
    </div>

    <div id="source">
        
    <a href="<%=request.getRequestURI()%>.src">View JSP Source</a><br />
        
    <a href="<%=request.getContextPath()%>/index.jsp">Back to Index</a>
    </div>


    </body>
    </html>


    部署,訪問(wèn)得到結(jié)果如下
     
    以上三篇文章的source下載
    http://www.tkk7.com/Files/dreamstone/mymenu.rar
    下載后自己增加lib文件

    posted on 2007-05-27 17:18 dreamstone 閱讀(3526) 評(píng)論(0)  編輯  收藏 所屬分類: web框架

    主站蜘蛛池模板: 中文日韩亚洲欧美制服| 国产91色综合久久免费分享| 亚洲国产片在线观看| 国产亚洲精品美女久久久| 永久免费av无码网站大全| 妻子5免费完整高清电视| 免费国产成人午夜在线观看| 三年片在线观看免费观看大全中国| 亚洲一区二区影视| 久久久亚洲欧洲日产国码aⅴ| 国产亚洲AV手机在线观看 | 亚洲成a人不卡在线观看| 亚洲日韩小电影在线观看| 亚洲国产精品成人久久蜜臀| 蜜臀91精品国产免费观看| 四虎在线免费播放| 欧洲精品成人免费视频在线观看| 4399影视免费观看高清直播| 野花香在线视频免费观看大全| 中国在线观看免费的www| 一区二区三区免费视频网站| 精品在线观看免费| 无忧传媒视频免费观看入口| 亚洲av日韩精品久久久久久a| 亚洲s码欧洲m码吹潮| 亚洲国产精品久久久久秋霞小| 亚洲久热无码av中文字幕| 亚洲日韩精品A∨片无码加勒比| 亚洲视频在线观看2018| 亚洲日本乱码卡2卡3卡新区| 亚洲人成网站在线在线观看| 亚洲精品无码久久久久久| 亚洲av无码成人精品区一本二本 | 中文字幕免费在线| 免费观看无遮挡www的小视频| 一级毛片免费毛片一级毛片免费| 久久久高清日本道免费观看| 99精品视频在线观看免费专区| 最近最好最新2019中文字幕免费| 午夜精品免费在线观看| 永久免费在线观看视频|