随笔-9  评论-168  文章-266  trackbacks-0

概述:  RadioGroup内含多个Radio,每个Radio.name必须相同,选中事件RadioGroup不提供,Radio子组件自行处理
功能:  选择一个Radio,动态加载GridPanel.


new Ext.form.RadioGroup({
       //fieldLabel : "资料选择",    //RadioGroup.fieldLabel 标签与 Radio.boxLabel 标签区别
       hideLabel : true,   //隐藏RadioGroup标签
       items : [
                  new ({                          //三个必须项
                               checked : true,                       //设置当前为选中状态,仅且一个为选中.
                               boxLabel : "书籍借阅",        //Radio标签
                               name : "borrow",                   //用于form提交时传送的参数名
                               inputValue : "book",              //提交时传送的参数值
                               listeners : {
                                     check : function(checkbox, checked) {        //选中时,调用的事件
                                                             if (checked) {
                                                                      borrow_grid.reconfigure(book_store,book_cm);  //动态重新加载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 : "标准借阅",
          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 紫蝶∏飛揚↗ 阅读(17126) 评论(0)  编辑  收藏 所属分类: EXTJS

只有注册用户登录后才能发表评论。


网站导航: