내 Sencha 앱에 중첩 목록을로드하려고합니다. 문제는 내가 그것에 익숙하지 않은 및 json 파일을 내가 사용하고 있는지 확실하지 않은 경우입니다.중첩 목록이 sencha에로드되지 않습니다.
[
{
"text":[
{
"text":"1.1.1",
"leaf":true
}],
"text":[
{
"text":"1.1.1",
"leaf":true
}
]
}
]
이것은 내 점포 코드
//Defining the store for the Nested List
Ext.define('InfoImage.store.nestedListStore', {
extend: 'Ext.data.TreeStore',
requires: 'InfoImage.model.nestedListModel',
id:'nestedListStore',
config:{
//Calling the required model for the Work Item List
model : 'InfoImage.model.nestedListModel',
//Defining the proxy for the Work Item List to pull the data for the List
proxy : {
type : 'ajax',
url : 'app/model/data/list.json',
reader: {
type: 'json',
root: 'items'
}
},
autoLoad: true
}
});
이고 내 주 코드 표시
Ext.define("InfoImage.view.nestedList", {
extend:'Ext.NestedList',
xtype:'nestedList',
id:'nestedList',
config:{
fullscreen:'true',
title:'Nested List',
xtype:'nestedList',
//displayField : 'text',
html:'Nested List on its way!!!',
store:'nestedListStore'
//itemTpl:'{text}'
}
});
출력 이잖아 [개체 개체]이다. 나는 실종 된 것을 모른다. 어떤 도움을 주셔서 감사합니다.
나는 그것을 사용해 보았지만 그 것이었다. 그래서 나는 그것이 올바른 코드인지 확인하기 위해 주석을 달았습니다. 나는 그것을 언 Commneted하고 다시 시도했다. 아직도 작동하지 않습니다. – Khush
동일한 오류가 발생합니까? 모델 코드도 게시 할 수 있습니까? –