मैं एक पैनलSencha स्पर्श: ताज़ा सूची: दुकान
prj.views.NewsList = Ext.extend(Ext.Panel, {
layout: 'card',
initComponent: function() {
this.list = new Ext.List({
itemTpl: '......',
loadingText: false,
store: new Ext.data.Store({
model: 'News',
autoLoad: true,
proxy: {
type: 'ajax',
url: '.....',
reader: {
type: 'json',
//root: ''
}
},
listeners: {
load: { fn: this.initializeData, scope: this }
}
})
});
this.list.on('render', function(){
this.list.store.load();
this.list.el.mask('<span class="top"></span><span class="right"></span><span class="bottom"></span><span class="left"></span>', 'x-spinner', false);
}, this);
this.listpanel = new Ext.Panel({
items: this.list,
layout: 'fit',
listeners: {
activate: { fn: function(){
this.list.getSelectionModel().deselectAll();
Ext.repaint();
}, scope: this }
}
})
this.items = this.listpanel;
prj.views.NewsList.superclass.initComponent.call(this);
},
});
Ext.reg('newsList', prj.views.NewsList);
एक dockedItem में एक उपकरण पट्टी सेटअप में अंदर एक Ext.List में खबर की एक सूची है, मैं इस सूची को ताज़ा करने के लिए एक आइकन होता है।
items: [
{
iconCls: 'refresh',
handler: function() {
prj.view.NewsList.list.store.read()
}
},
]
लेकिन prj.view.NewsList वापसी अपरिभाषित! स्टोर की रीफ्रेश करने के लिए मैं सूची कैसे प्राप्त कर सकता हूं?
मैं स्टोर को Ext.StoreMgr.get ('newsStore') द्वारा पुनर्प्राप्त करता हूं। लोड()। लेकिन मैं सूची के साथ पैनल को रीफ्रेश कैसे कर सकता हूं? सेन्चा टच 2.x बाइंडस्टोर पर – BasicCoder