我是通過JSONP列表檢索信息和我越來越控制檯瀏覽器中出現以下錯誤:「意外的標記:」錯誤JSONP商店
我的店:
Ext.define ('Projeto.store.Mural', {
extend 'Ext.data.Store'
requires: [
'Projeto.model.Mural'
]
config: {
autoLoad: true,
model: 'Projeto.model.Mural'
storeId 'MuralStore'
Proxy {
type: 'jsonp'
url: 'http://URL/mural'
reader: {
type: 'json',
rootProperty: 'rows'
}
}
}
});
我的列表:
Ext.define ('Projeto.view.MuralList', {
extend 'Ext.dataview.List'
alias: 'widget.murallist'
config: {
loadingText: 'Loading ...',
store: 'MuralStore'
itemTpl: [
'<div> Message: {message} </ div>
]
}
});
JSON返回我的網址:
{
"rows": [
{
"lookup": "yyyy"
"dateTime", "10/10/1970"
"id": "1",
"message": "yyyy"
}
{
"lookup": "dsdfasfsadf"
"dateTime", "15/05/2012"
"id": "2",
"message": "dsdfasfsadf"
}
]
}
有誰知道爲什麼錯誤,因爲JSON的格式是有效的。
謝謝。
itemTpl:的值缺少結尾引號,這是一個錯字還是它的外觀? – 2012-04-26 18:05:37
它錯字。 - @DiêgoNunes – 2012-04-26 20:45:17