当在. Ext.dataview.List
_ 知道怎么做吗?使用我的以下代码,我可以看到空的。调试时我可以看到正确填充。Store
Controller
Ext.dataview.List
storeEvents2
如果可能,请向我提供代码示例。
populateViewsAfterLogIn: function (){
var me = this;
debugger
var storeEvents2 = Ext.getStore('Events2');
storeEvents2.load();
storeEvents2.sync();
var myEventsList = me.getEventsList();
myEventsList.initialize();
myEventsList.data(storeEvents2);
},
店铺
Ext.define('XXX.store.Events2',{
extend: 'Ext.data.Store',
requires: ['Ext.data.proxy.JsonP'],
config:{
model: 'XXX.model.Event2',
proxy:{
type:'jsonp',
url: Configurations.listAllTimetableEventsCustom,
reader:'json'
},
autoLoad:true,
sorters: [{ property: 'DateTimeStart', direction: 'ASC'}] ,
grouper: {
groupFn: function(item) {
return item.get('convDate');
},
sortProperty: 'groupSorterProp',
direction: "ASC"
}
}
});
看法
Ext.define("XXX.view.EventsList", {
extend: "Ext.dataview.List",
alias: "widget.eventslist",
config: {
loadingText: "Loading Events...",
emptyText: '<div class="notes-list-empty-text">No notes found.</div>',
onItemDisclosure: false,
itemTpl: '<div class="list-item-title">\n\
<div class="list-item-title-row">\n\
<div class="bl-hours"><span class="timetable-hours">{DateTimeStartConverted}</span></div>\n\
<div class="bl-event">{EventTitle}</div>\n\
</div>\n\
</div>',
grouped: true
}
});