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 閱讀(257) 評論(0)  編輯  收藏


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


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

          導航

          統計

          常用鏈接

          留言簿

          隨筆檔案

          搜索

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 龙胜| 吉林省| 达日县| 龙泉市| 武乡县| 买车| 衡阳县| 伊吾县| 龙山县| 广宁县| 淮安市| 天台县| 临江市| 北票市| 内丘县| 澜沧| 化隆| 永德县| 金堂县| 万年县| 唐山市| 班玛县| 保康县| 奉贤区| 裕民县| 虞城县| 丹东市| 稻城县| 富阳市| 两当县| 昆山市| 宜宾县| 湘西| 青田县| 社旗县| 大竹县| 年辖:市辖区| 韩城市| 库车县| 北辰区| 循化|