0
我有一個名爲employee的表。 empid和empname是2個字段。我想通過Web服務將數據從該表中獲取到sencha觸摸列表視圖。我的web服務正在返回json數據;我的意思是我把輸出轉換成json。我的JavaScript代碼如下無法將數據從webservice獲取到sencha觸摸列表視圖
Ext.data.JsonStore({
proxy: new Ext.data.HttpProxy({
url: 'http://localhost:58984/Service1.asmx/GetListData', // werservicename.asmx/webMethodName
headers: {
'content-type': 'application/json'
}
}),
root: 'd',
idProperty: 'empid', // provide the unique id of the row
fields: [empname] // specify the array of fields
});
itemTpl: '{empname}'
但我得到2個錯誤:
empname
沒有定義- 即使他們的文件已加載以下類不聲明:「Acsellerate .view.Main'。請檢查可能的拼寫錯誤的對應文件的源代碼:「應用程序/視圖/ Main.js