zoukankan      html  css  js  c++  java
  • Extjs RadioBox 单选

    // 两个radio 只是显示,两个具有互斥性,触发事件时给一个隐藏字段赋值,后台读取隐藏字段,肯定不是最优,望高手拍砖

    this.cntRadio = new Ext.form.Radio({
            id: 'cntRadioId',
            boxLabel: '数量',
            inputValue: 'cnt',
            listeners: {
                'check': function() {
                    //alert(this.getValue());
                    if (this.getValue()) {
                        Ext.getCmp('moneyRadioId').setValue(false);
                        this.setValue(true);
                        Ext.getCmp('aresultType').setValue('cnt');
                    }
                }
            }
    });
     this.moneyRadio = new Ext.form.Radio({
            id: 'moneyRadioId',
            boxLabel: '总投资',
            inputValue: 'money',
            listeners: {
                'check': function() {
                    if (this.getValue()) {
                        Ext.getCmp('cntRadioId').setValue(false);
                        this.setValue(true);
                        Ext.getCmp('aresultType').setValue('totalMoney');
                    }
                }
            }
    });

     this.formPanel = new Ext.form.FormPanel({
          baseCls: 'x-plain',
          frame: false,
          id: id,
          bodyStyle: 'padding:5px 12px',
          url: 'Station.aspx?ac=Analysis',
          items: [{
                    xtype: 'hidden',
                    id: 'agroupType',
                    value: 'country'
                }, {
                    xtype: 'radiogroup',
                    fieldLabel: '统计结果',
                    id: 'resultRadio',
                    items: [
                        this.cntRadio, this.moneyRadio
                    ]
              }]

    });

  • 相关阅读:
    让Editplus自动格式化js、css、html。。。
    超强JavaScript编辑器WebStorm上安装zenCoding
    魔哥Css:背景色透明,内容不透明之终极方法!兼容(不支持ie6)。
    支持二次开发的Zigbee模块(SNAP技术)
    XI Monitor Analysis
    SAP 增强方式
    查找业务对应的IDOC类型(HELP)
    POS DM 学习URL
    IDOC MSGRN
    XI 安装MS SQLSERVER JDBC 驱动
  • 原文地址:https://www.cnblogs.com/oftenlin/p/2672211.html
Copyright © 2011-2022 走看看