//產品store
window.product_store=Ext.create('Ext.data.Store',{
fields:[
'id',
'aid',
'webid',
'title',
'kindlist',
'attrid',
'ishidden',
'displayorder',
'kindname',
'attrname',
'themelist',
'iconlist',
'modtime',
'templet',
'url',
'finaldestid',
'finaldestname'
],
proxy:{
type:'ajax',
api: {
read: SITEURL+'article/article/action/read', //讀取數據的URL
update:SITEURL+'article/article/action/save',
destroy:SITEURL+'article/article/action/delete'
},
reader:{
type: 'json', //獲取數據的格式
root: 'lists',
totalProperty: 'total'
}
},
remoteSort:true,
autoLoad:true,
pageSize:30,
listeners:{
load:function( store, records, successful, eOpts )
{
if(!successful){
ST.Util.showMsg("{__('norightmsg')}",5,1000);
}
var pageHtml = ST.Util.page(store.pageSize, store.currentPage, store.getTotalCount(), 10);
$("#line_page").html(pageHtml);
window.product_grid.doLayout();
$(".pageContainer .pagePart a").click(function () {
var page = $(this).attr('page');
product_store.loadPage(page);
});
}
}
});load( Ext.data.Store store, Ext.data.Model[] records, Boolean successful, Object eOpts )
每當store從遠程數據源讀取數據時觸發此事件.
store : Ext.data.Store
當前Store對象
records : Ext.data.Model[]
數據記錄數組
successful : Boolean
當操作成功時為'true'.
eOpts : Object
The options object passed to Ext.util.Observable.addListener.
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。