我試圖讓組合框運行,但是當我將它添加到我的窗體時,窗體不顯示。combobox不能在extjs 4 mvc環境中運行?
這裏是我的表單代碼:
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的,請告訴我如何得到它的工作
好,我已經試過了,但依然面臨着同樣的問題,我已經創建的主面板上的三個按鈕,點擊一個他們打開窗體,但它沒有發生,當我添加組合框,但其他按鈕工作正常,當我嘗試在需求[]添加Ext.form.field.ComboBox,應用程序不加載。在api中的組合框類的任何問題? – 2012-04-15 21:36:59
使用Firefox。安裝螢火蟲。螢火蟲有沒有錯誤?謝謝 – 2012-04-15 23:46:21