當前位置:編程學習大全網 - 熱門推薦 - ext中model 和store 和listener的關系

ext中model 和store 和listener的關系

model表示要顯示的列模型

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) ;") ;

}}});

  • 上一篇:南京胖哥第二次手術結束報平安,他的見義勇為避免了什麽後果?
  • 下一篇:熬海鮮粥怎麽去海鮮的腥味?
  • copyright 2024編程學習大全網