1
내 코드에 버그가 있지만 잘못된 점을 파악할 수 없습니다. NestedList의 리프 항목을 누를 때 저장소에 새 URL을 설정하려고합니다. 내 가게는 다음과 같습니다.Store의 프록시에서 URL을 설정하는 방법은 무엇입니까?
Ext.define('Application.store.DetailStore', {
extend: 'Ext.data.Store',
config: {
model: 'Application.model.DetailModel',
autoLoad :true,
sorters: 'title',
grouper : function(record) {
return record.get('title')[0];
},
proxy: {
type: 'ajax',
url : '/data/data1.php',
reader: {
type: 'json',
rootProperty:'recipes'}
}
}
}}); 내가 표시되지 않습니다 잎 항목 및 세부 카드에 탭 두지이 후
onLeafItemTap: function(nestedList, list, index, node, record, e) {
filter = record.get('text');
var detailCard = nestedList.getDetailCard();
Ext.getStore('Application.store.DetailStore').getProxy().setUrl('/data/data2.php');
Ext.getStore('Application.store.DetailStore').load()
}
:
는 그리고이 NestedList에서 leafitemtap 내 청취자입니다. 무엇이 잘못 될 수 있는지 아는 사람이 있습니까?
의에 storeId를 사용할 수 있습니다 Ext.getStore (' ( 형식 : 'ajax', url : '/data/data2.php') .getProxy 및 setUrl 대신 load() –
답장을 보내 주셔서 감사합니다! 하지만 도움이되지 않습니다, 나는 여전히 리프 항목을 탭 수 없습니다. Ext.getStore ('Application.store.DetailStore') 뒤에 무언가를 썼을 때 코드의 일부분을 삭제하고 테스트를 마쳤습니다. –
NestedList 뷰, 모델 및 상점에서 가져 오는 JSON을 게시 할 수 있습니까? –