用DWR进行数据传递
combo的store用dwrStore
combo里有个store属性,是获取数据的,store里有个url,是请求的路径,你后台请求以后传回一个json数据就可以获取了,你要把数据的属性名对应起来
var nwrComboStore = new Ext.data.Store({
id: 'nwrComboStore',
proxy: new Ext.data.HttpProxy({ url: 'handler.ashx?type=1' }),
reader: new Ext.data.JsonReader({
fields: [{ name: 'SubjectID' }, { name: 'SubjectName'}]
})
});
把combo的store binding到nwrComboStore