store表示數據源
listener表示監聽
給妳個示例:
new Ext.data.Store({
proxy:new Ext.data.HttpProxy({
url:'archiveUsingRegister.html?method=listUsingStore'
}),
id: 'usingStoreStore' ,
usingStoreFields: [{name: 'id'},{name: 'username'}] ,
usingStoreColumnModel: new Ext.grid.ColumnModel( [ new Ext.grid.CheckboxSelectionModel(),{header: '',dataIndex: 'id',hidden:true},{header: '姓名',dataIndex: 'username',hidden:false} ] ) ,
reader:new Ext.data.JsonReader({
totalProperty: 'totalCount',root:'usingStores'},[{name: 'id'},{name: 'username'}]),
listeners: {update: function(s,r){") ;
saveUsingStoreSingle(s,r) ;") ;
}}});