如何用Ext的ComboBox动态加载数据库中的数据
展开全部
代码如下:
varprovinceStore=newExt.data.Store({
proxy:newExt.data.HttpProxy({url:basePath+"/stationManage/station_getProvinceJSON.action"}),
reader:newExt.data.JsonReader(
{root:""},
["PROVINCEID","PROVINCENAME"]
)
});
//选择省市
varprovinceIDadd=newExt.form.ComboBox({
anchor:'98%',
id:'provinceIDadd',
name:"provinceIDAdd1",
hiddenName:"provinceID",
displayField:"PROVINCENAME",
valueField:"PROVINCEID",
blankText:'请选择站点所属省份',
varprovinceStore=newExt.data.Store({
proxy:newExt.data.HttpProxy({url:basePath+"/stationManage/station_getProvinceJSON.action"}),
reader:newExt.data.JsonReader(
{root:""},
["PROVINCEID","PROVINCENAME"]
)
});
//选择省市
varprovinceIDadd=newExt.form.ComboBox({
anchor:'98%',
id:'provinceIDadd',
name:"provinceIDAdd1",
hiddenName:"provinceID",
displayField:"PROVINCENAME",
valueField:"PROVINCEID",
blankText:'请选择站点所属省份',
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询