定义一个事件
/* 增加事件,第一个参数为事件名称,第二个参数为方法,第三个参数为当前的model */
justep.Shell.on("onOwnerContactsChanged", this.onClassChanged, this);
/*发生变化时怎么处理事件*/
Model.prototype.onClassChanged= function(classData) {
debugger;
// this.comp("personInfoData").clear();
// this.comp("personInfoData").loadData(classData)
this.pesonInfoList.refresh(true);
};
Model.prototype.modelUnLoad = function(event) {
/* 关闭事件 */ justep.Shell.off("onOwnerContactsChanged",this.onClassChanged);
};
/*触发事件*/
justep.Shell.fireEvent("onOwnerContactsChanged", "");