我有一个
Ext.window.Window
有自己的控制器(1/2)。此窗口有一个按钮,用于向网格中添加行。它添加的行数与
events
在
save
Ajax调用。
每次打开窗口时如何重置这些事件?成功后我正在初始化窗口
节约
.
窗户经常使用,需要
closeAction: 'hide'
代码
var controller = this, // Window Controller
activeRec = controller.activeRecord,
store = Ext.getStore('Manage'), // Store for the window
window = Ext.getCmp('window'), // window component
submitMask = new Ext.LoadMask({target: window, msg: 'Saving data...'}),
saveButton = Ext.ComponentQuery.query('#am_save_button');
Ext.Ajax.request({
url: '/save',
method: 'POST',
jsonData: jsonChanges,
scope: this,
success: function (response, batch) {
store.load();
window.record = activeRec;
controller.init();
saveButton[0].disable();
submitMask.hide();
},
[...]
});
慰问
dispatch
â
<this>: (optimized away)
â
args: (2) [â¦]
â
arguments: Arguments
â
bus: (optimized away)
â
controllers: {â¦}
â
ev: "click"
â
event: {â¦}
â
events: (4) [â¦] <-- needs to be '1'
â
i: 0
â
id: "AccountsManagementController"
â
ln: 4
â
me: {â¦}
â
selector: "accounts_management_grid button[name=\"am_add_account\"]"
â
selectors: {â¦}
â
target: {â¦}