Home >Web Front-end >JS Tutorial >ext checkboxgroup backfill data solution_YUI.Ext related

ext checkboxgroup backfill data solution_YUI.Ext related

WBOY
WBOYOriginal
2016-05-16 18:47:391464browse

Rewrite

Copy code The code is as follows:

//Solve the checkboxgroup backfill data problem
Ext.override(Ext.form.BasicForm,{
findField : function(id){
var field = this.items.get(id);
if(!field){
this. items.each(function(f){
if(f.isXType('radiogroup')||f.isXType('checkboxgroup')){
f.items.each(function(c){
if(c.isFormField && (c.dataIndex == id || c.id == id || c.getName() == id)){
field = c;
return false;
}
});
}

if(f.isFormField && (f.dataIndex == id || f.id == id || f.getName() == id) ){
field = f;
return false;
}
});
}
return field || null;
}

}) ;
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn