隨筆-9  評論-168  文章-266  trackbacks-0

          概述:  RadioGroup內(nèi)含多個Radio,每個Radio.name必須相同,選中事件RadioGroup不提供,Radio子組件自行處理
          功能:  選擇一個Radio,動態(tài)加載GridPanel.


          new Ext.form.RadioGroup({
                 //fieldLabel : "資料選擇",    //RadioGroup.fieldLabel 標(biāo)簽與 Radio.boxLabel 標(biāo)簽區(qū)別
                 hideLabel : true,   //隱藏RadioGroup標(biāo)簽
                 items : [
                            new ({                          //三個必須項
                                         checked : true,                       //設(shè)置當(dāng)前為選中狀態(tài),僅且一個為選中.
                                         boxLabel : "書籍借閱",        //Radio標(biāo)簽
                                         name : "borrow",                   //用于form提交時傳送的參數(shù)名
                                         inputValue : "book",              //提交時傳送的參數(shù)值
                                         listeners : {
                                               check : function(checkbox, checked) {        //選中時,調(diào)用的事件
                                                                       if (checked) {
                                                                                borrow_grid.reconfigure(book_store,book_cm);  //動態(tài)重新加載GridPanel
                                                                                book_store.load();
                                                                       }
                                                            }
                                         }
                             }),
                             new Ext.form.Radio({            //以上相同
                    boxLabel : "期刊借閱",
                    name : "borrow",
                    inputValue : "magazine",
                    listeners : {
                     check : function(checkbox, checked) {
                      if (checked) {
                       borrow_grid.reconfigure(magazine_store,magazine_cm);
                       magazine_store.load()
                      }
                     }
                    }
                   }), new Ext.form.Radio({
                    boxLabel : "標(biāo)準(zhǔn)借閱",
                    name : "borrow",
                    inputValue : "standard",
                    listeners : {
                     check : function(checkbox, checked) {
                      if (checked) {
                       borrow_grid.reconfigure(
                         standard_store,
                         standard_cm);
                       standard_store.load();
                      }
                     }
                    }
                   })]
                })

          posted on 2009-04-01 09:31 紫蝶∏飛揚(yáng)↗ 閱讀(17146) 評論(0)  編輯  收藏 所屬分類: EXTJS
          主站蜘蛛池模板: 和静县| 余江县| 白水县| 阿瓦提县| 富裕县| 肇州县| 曲麻莱县| 于都县| 婺源县| 汝城县| 临洮县| 湾仔区| 峨边| 新源县| 昌黎县| 石楼县| 西乌珠穆沁旗| 吐鲁番市| 岚皋县| 渝中区| 大埔县| 南乐县| 卓资县| 化州市| 永春县| 青龙| 清新县| 克拉玛依市| 台东市| 安达市| 措美县| 曲阜市| 墨脱县| 青河县| 铁岭市| 思南县| 伊吾县| 达日县| 若羌县| 武威市| 施甸县|