ExtJs comboBox 无法取出json数据
前台部门代码为:{columnWidth:.4,layout:"form",items:[{xtype:"combo",fieldLabel:"部门名称",name:"d...
前台部门代码为:
{
columnWidth:.4,
layout:"form",
items:[{
xtype:"combo",
fieldLabel:"部门名称",
name:"dep_name",
id:"dep_name",
store:new Ext.data.JsonStore({
fields:["dep_id","dep_name"],
url:'admin/MainManager?do=dept_name',
autoLoad:true,
root:"dept"
}),
valueField:"dep_id",
displayField:"dep_name",
typeAhead:true,
mode:"local",
forceSelection:true,
triggerAction:"all",
emptyText:"选择单位...",
OnFocus:true
}]
}
从后台获取的json数据为:
{"dept":[{"dep_id":"101000","dep_name":"市部","id":0,"muser_id":"","oby":0,"p_id":""},{"dep_id":"101010","dep_name":"大客户","id":0,"muser_id":"","oby":0,"p_id":""},{"dep_id":"","dep_name":"","id":0,"muser_id":"","oby":0,"p_id":""}]}
到底什么地方错了,为什么前台的下拉别表中总是没有数据显示 展开
{
columnWidth:.4,
layout:"form",
items:[{
xtype:"combo",
fieldLabel:"部门名称",
name:"dep_name",
id:"dep_name",
store:new Ext.data.JsonStore({
fields:["dep_id","dep_name"],
url:'admin/MainManager?do=dept_name',
autoLoad:true,
root:"dept"
}),
valueField:"dep_id",
displayField:"dep_name",
typeAhead:true,
mode:"local",
forceSelection:true,
triggerAction:"all",
emptyText:"选择单位...",
OnFocus:true
}]
}
从后台获取的json数据为:
{"dept":[{"dep_id":"101000","dep_name":"市部","id":0,"muser_id":"","oby":0,"p_id":""},{"dep_id":"101010","dep_name":"大客户","id":0,"muser_id":"","oby":0,"p_id":""},{"dep_id":"","dep_name":"","id":0,"muser_id":"","oby":0,"p_id":""}]}
到底什么地方错了,为什么前台的下拉别表中总是没有数据显示 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询