我试图让一个组合框运行,但是当我将它添加到我的表单时,表单不显示。
这是我的表单代码:
Ext.define("Screener.view.Pharmacyform", {
xtype: 'pharmacyform',
extend: 'Ext.form.Panel',
requires: ['Ext.tab.Panel','Ext.form.FieldSet'],
config:{
styleHtmlContent: true,
xtype:'orderform',
autoscroll: true,
items:[{
xtype: 'fieldset',
title: 'Pharmacy Order',
items: [
{
xtype: 'textfield',
name : 'name',
label: 'Name'
},{
{xtype: 'combo',
fieldLabel: 'Combobox',
name:'drugdrug',
id:'combodrug',
store: Ext.create('Screener.store.Drugs',{
storeId: 'drugstore'
}),
displayField: 'drugname',
valueField: 'drugname',
queryMode: 'local',
triggerAction: 'all'
}
]
}]
}
});
药店代码:
/*
* This store loads the drugs from file 'drugs.json'
* Note: there is no writer attached, so changes will
* only occur in local cache
*/
Ext.define('Screener.store.Drugs', {
extend: 'Ext.data.Store',
storeId: 'drugStore',
config: {
model: 'Screener.model.Drug',
proxy: {
type: 'ajax',
url : 'drugs.json',
reader: 'json',
},
autoLoad: true
}
});
我是 extjs 的新手,请告诉我如何让它工作