获取RadioGroup Extjs4中最后选择的选项(Get the last selected option in RadioGroup Extjs4)
有没有办法获得广播组中最后选择的选项?
IS there any way to get the last selected option in the radio group?
最满意答案
您可以在更改时手动添加侦听器:
radGrp = {xtype: 'radiogroup', ... previousVal:undefined, listeners:[ change: function( this, newValue, oldValue, eOpts ) {this.previousVal = oldValue;} ]}在此之后,您可以访问此属性
var getRadPrevious= function(){ return radGrp.previousVal; }You can manually add listener on change:
radGrp = {xtype: 'radiogroup', ... previousVal:undefined, listeners:[ change: function( this, newValue, oldValue, eOpts ) {this.previousVal = oldValue;} ]}After this you can access to this attribute
var getRadPrevious= function(){ return radGrp.previousVal; }更多推荐
发布评论