- rowEditors. , .
, .
:
initEditorConfig: function(){
var me = this,
grid = me.grid,
view = me.view,
headerCt = grid.headerCt,
btns = ['saveBtnText', 'cancelBtnText', 'errorsText', 'dirtyText'],
b,
bLen = btns.length,
cfg = {
autoCancel: me.autoCancel,
errorSummary: me.errorSummary,
fields: headerCt.getGridColumns(),
hidden: true,
view: view,
// keep a reference..
editingPlugin: me
},
item;
for (b = 0; b < bLen; b++) {
item = btns[b];
if (Ext.isDefined(me[item])) {
cfg[item] = me[item];
}
}
return cfg;
}`
rowEditor, btns Array:
btns :
btns = ['saveBtnText', 'cancelBtnText', 'errorsText', 'dirtyText']
for (b = 0; b < bLen; b++) {
item = btns[b];
if (Ext.isDefined(me[item])) {
cfg[item] = me[item];
}
}
foreach string btnArray , cfg , config. , , :
: :
the saveBtnText property, which is the first element of the btns array, must exist in cfg:
if (Ext.isDefined(me[item])) {
cfg[item] = me[item];
}
this search if the property exists: if (Ext.isDefined(me[item]))
if saveBtnText already exists in rowEditor properties, then:
cfg[item] = me[item];
and an additional config property will be added !!