나는 Sencha Touch를 처음 사용하므로 매장 사용에 어려움이 있습니다.Sencha Touch 2 점의 요소에 액세스하는 방법
내가 성공적으로 목록을 채우는 데 사용하고이 가게 만들었습니다 : 나는 목록에서 참조 나는 그것의 내용을 표시 할 수 있습니다 때이 저장소가 제대로 작동 mentiones으로
Ext.define('EventApp.store.events',{
extend: 'Ext.data.Store',
config: {
model: 'EventApp.model.event',
autoLoad: true,
storeId: 'events',
proxy:{
type:'ajax',
url: './resources/EventData.json',
reader: {
type: 'json',
rootProperty: 'events'
}
}
}
});
합니다. 따라서 저장소가 올바르게 정의되었다고 가정합니다.
유감스럽게도 (캐 러셀 항목을 채우는 데 사용할 수있는) 내보기 중 하나의 컨트롤러에서 저장소에 액세스하려고하면 저장소에서 데이터를 다시 얻지 못하는 것 같습니다. 내가 eventsStore.sync() 상에 eventsStore.load()를 실행 시도했지만 내가 가게에있는 모든 요소를 사용할 얻을 수가 없다
onEventCarouselInitialize : function(compon, eOptions) {
var past = compon.getPast();
var eventsStore = Ext.getStore('events');
eventsStore.each(function(record){
console.log('Record =',record); //<-- this never gets executed.
},this);
}
: 내가 사용하고 코드는 다음과 같다.
무엇이 누락 되었습니까?
감사 오리올