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
                    ]
              }]

    });

  • 相关阅读:
    关于hive Metadata 使用 MsSQL
    hdp 2.06 安装备忘
    对于自我管理 ObjectContextManager的测试
    关于 Linq to EF 的内存泄漏问题
    使用过多的递归出现错误,“System.StackOverflowException”类型的未经处理的异常在 mscorlib.dll 中发生
    PowerShell 如何 远程连接【转】
    win7系统浏览器老是自动弹出网页怎么办
    win10如何深度清理C盘
    Win7电脑系统崩溃怎么解决?
    win7磁盘打不开如何解决
  • 原文地址:https://www.cnblogs.com/oftenlin/p/2672211.html
Copyright © 2011-2022 走看看