[英]How To use load listener in Extjs4
I am learning how to utilize the load event ..how do i go about catching the loading of data.. I just n4ed a sample example.. to understand how it works and how data is manipulated inside the callback function 我正在学习如何利用加载事件..我是如何去捕获数据的加载..我只是一个示例示例..了解它是如何工作的以及如何在回调函数内操作数据
Thanks 谢谢
store.addListener("load", dataLoadCallback);
function dataLoadCallBack((store, records, success))
}
store.on('load',/*event*/,dataLoadcallback /*function called*/, this/*scope called*/)
function dataLoadBackCalled(store, records){ //dont stress about success just yet.
store.each(function(record)){
console.log(record.get('id');
}
}
Heres a nice post on how to do listeners: http://mitchellsimoens.com/2011/12/ext-js-4/ext-define-and-listeners-as-a-property-bad/ 以下是关于如何做听众的好帖子: http : //mitchellsimoens.com/2011/12/ext-js-4/ext-define-and-listeners-as-a-property-bad/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.