zoukankan      html  css  js  c++  java
  • Extjs4 radiogroup打开时的被选中值设置为变量

    在打开有radiogroup时,有时会需要被选中的值不是某个定值,而是根据某个变量可以变化的。

    这是radiogroup的代码:

            items: [{
            xtype: 'radiogroup',

    id: 'myRadio',
    height: 60,
    items: [
     { boxLabel: '经典蓝', name: 'changeTheme', inputValue: 'ext-all', 80 ,checked: true},
     { boxLabel: '气质灰', name: 'changeTheme', inputValue: 'ext-all-gray', 80 },
     { boxLabel: '深海蓝', name: 'changeTheme', inputValue: 'ext-all-slate', 80 }
     ]
    }]

    这是打开radiogroup所在的页面时,动态设置radiogroup的值:

    Ext.getCmp('myRadio').setValue({changeTheme:themeTemp});

    setValue中必须是object数组,其中changeTheme是radiogroup的name,themeTemp是设置的变量。但是themeTemp必须是inputValue中的某一个值。

  • 相关阅读:
    windows下mysql多实例安装
    linux下mysql多实例安装
    redisAPI整理
    Flink
    Google Dremel架构
    Apache Kylin
    Phoenix概述
    SQL on Hadoop技术综述
    AES对称加密算法
    Hawq架构
  • 原文地址:https://www.cnblogs.com/webu/p/2770463.html
Copyright © 2011-2022 走看看