重写保存按钮save事件

 _saveActionEventHandler:function(event,value){
if (!_self.fireEvent("saveBefore")) return;
var option = _self.getOptionFromArguments(arguments);
_self.fireEvent("fieldOnStoreEvent");
//更改保存的数据
_self._model.number = 123;
var editModel = waf.toJSONString(_self.getCurrentModel());
option.action = "save";
if (option&&option.data){
option.data.model=editModel;
}
else{
option.data = {
model:editModel
}
}
option.success = option&&option.success?option.success:function(objectPK){
_self.showInfo(waf.dynamicEdit.info.savesuccess);
document.location.href = listUrl;
}
waf.doPost(option);
}
});
//注册数据保存事件
_self.subscribeEvent("saveActionEvent", _private._saveActionEventHandler,"overwrite");​
上一篇:Python的字典dictionary


下一篇:沃通SSL证书、代码签名证书应用于机器人安全防护