简体   繁体   English

在组合字段中使用extjs jsonstore子数据

[英]using extjs jsonstore subdata in an combo field

following extjs3 problem: i have an json store: 以下extjs3问题:我有一个json商店:

dbStore = new Ext.data.JsonStore({
    url: '/?[action]=getFormData',
    storeId: 'formdata',
    fields: [{'database':['name', 'id'], 'parameter':['name','id']}],
    autoLoad: true
});

and i create an formpanel with following combo field: 我用以下组合字段创建一个formpanel:

{
xtype: 'combo',
name: 'database',
id: 'database',
store: ???,
fieldLabel: '',
valueField: 'id',
displayField: 'name',
emptyText: 'Select'
}

i want that combo field to use the 'database' fields 'name' and 'id', how to do that?? 我希望该组合字段使用“数据库”字段“名称”和“ id”,该怎么做?

尝试将root:'database'添加到您的商店。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM