{xtype:"radiogroup",
    name:"sex1",
    fieldLabel:'性别',
    width:300,
    items:[{xtype:"radio",       
                        name : "sex",      //传到后台的参数名
                        inputValue :1,       //传到后台的参数值
                        boxLabel : "男", //显示标签
           checked:true   
                    }, new Ext.form.Radio({       
                        name : "sex",    
                        inputValue : 0, 
                        boxLabel : "女"      
                              
                    })] 
}
 
遇到一种特殊情况,当我把inputValue设置为inputValue : "0"后竟然发现radiogroup不能选择了,只能定在这个设置为0的上面,应该是个bug吧,其他都设置正常的。 

 ===================

punishType.setValue([true,false,false]); 不生效

解决方案:

 
  
  1. var type = record.data.punishMode; 
  2.                                         var punishType = blackListEditWin.getBlackListEditForm().items.get("item_PunishType"); 
  3.                                         if(type == 0){ 
  4.                                             punishType.setValue('id_waterMark',true); 
  5.                                         } 
  6.                                         if(type == 1){ 
  7.                                             punishType.setValue('id_disconnect',true); 
  8.                                         } 
  9.                                         if(type == 2){ 
  10.                                             punishType.setValue('id_errorCode',true); 
  11.                                         }