t:jscookMenu t:panelNavigation2 及 t:jscookMenu不能夠使用action跳轉


          * 在jscookMenu所在的form里面添加:<input id="jscook_action" name="jscook_action" type="hidden"/>
             不加這句的話,就只會顯示cookMenu,但是不能夠使用action跳轉 

          (這在網上找了N久才找到的。。。

            http://chinabin.bokee.com/6741696.html  貌似是這個地方。。。。哈哈

          <h:form id="popup_form">
                <input id="jscook_action" name="jscook_action" type="hidden"/>
                     
                    <h:panelGrid columns="1" style="border: solid 1px blue" >
                         
                         <t:jscookMenu layout="hbr" theme="ThemeOffice">
                               <t:navigationMenuItems value="#{userManager.vo.navItems}" />
                          </t:jscookMenu>
                            
                                 //    public NavigationMenuItem[] getNavItems() {
                                  //        NavigationMenuItem[] subItems = new NavigationMenuItem[2];
                                  //        subItems[0] = new NavigationMenuItem("Subitem 2_1 Label","/index.jsf","/img/img_01.jpg",false); //可以跳轉
                                  //        subItems[1] = new NavigationMenuItem("Subitem 2_2 Label","index.jsf","img/img_01.jpg",false);  //這種方式不能跳轉
                                  //       
                                  //        // item 2
                                  //        NavigationMenuItem itemWithChildren = new NavigationMenuItem("Item 2 Label", "action2");
                                  //        itemWithChildren.setNavigationMenuItems(subItems);
                                  //       
                                  //        // root items
                                  //        navItems = new NavigationMenuItem[3];
                                  //        navItems[0] = new NavigationMenuItem("Item 1 Label","index");    //可以跳轉
                                  //        navItems[1] = itemWithChildren;
                                  //        navItems[2] = new NavigationMenuItem("Item 3 Label","action3");
                                  //
                                  //        System.out.println("00000000000");
                                  //       
                                  //        return navItems;
                                  //    }
                        
                           <t:jscookMenu layout="hbr" theme="ThemeOffice">
                               <t:navigationMenuItem itemLabel="File">
                                  <t:navigationMenuItem action="new-file" itemLabel="New">
                                      <t:navigationMenuItem action="open-file" itemLabel="new_1"/>
                                      <t:navigationMenuItem action="open-file" itemLabel="new_2"/>
                                 </t:navigationMenuItem>
                               <t:navigationMenuItem action="open-file" itemLabel="Open"/>
                               <t:navigationMenuItem action="open-file" itemLabel="Close" rendered="#{menuBean.closeFileAvailable}"/>
                               <t:navigationMenuItem action="index" itemLabel="返回"/>
                               </t:navigationMenuItem>
                           
                            <t:navigationMenuItem itemLabel="Edit">
                               <t:navigationMenuItem action="#{userManager.goTo}" itemLabel="New"/>
                               <t:navigationMenuItem actionListener="#{userManager.goTo}" action="index" itemLabel="返回"/>
                              
                            </t:navigationMenuItem>
                          </t:jscookMenu>
                         
                          <t:panelNavigation2>
                             <t:commandNavigation2>
                              <h:outputText value="網站"/>
                              <t:commandNavigation2 externalLink="http://www.baidu.com">
                                   <h:outputText value="百度"/>
                              </t:commandNavigation2>
                              <t:commandNavigation2 externalLink="http://www.sina.com">
                                   <h:outputText value="新浪"/>
                             </t:commandNavigation2>
                          </t:commandNavigation2>
             
                      </t:panelNavigation2>
                      </h:panelGrid>
                 
              </h:form>




















          posted on 2011-02-28 19:01 NOHI 閱讀(256) 評論(0)  編輯  收藏


          只有注冊用戶登錄后才能發表評論。


          網站導航:
           
          <2011年2月>
          303112345
          6789101112
          13141516171819
          20212223242526
          272812345
          6789101112

          導航

          統計

          常用鏈接

          留言簿

          隨筆檔案

          搜索

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 湘潭市| 那坡县| 武安市| 手游| 阿拉善右旗| 德钦县| 乌恰县| 大同县| 玉林市| 哈尔滨市| 密云县| 莒南县| 安吉县| 苏尼特左旗| 安岳县| 夹江县| 延川县| 德阳市| 雅江县| 新乡市| 新民市| 应用必备| 罗平县| 桃源县| 丹阳市| 昌都县| 秭归县| 吕梁市| 永福县| 尚志市| 西昌市| 湾仔区| 铜陵市| 枝江市| 斗六市| 新平| 西乌珠穆沁旗| 渭南市| 岚皋县| 香河县| 介休市|