Controller
if(rec.data.category == "TestLinksList") {
/* Assign new store before loading view */
/* ----- Start: Code not working ----- */
var testStore = Ext.getStore('linksStore');
testStore.load();
/* ----- End: Code not working ----- */
};
this.getHome().push({
xtype : rec.data.category,
// Assign testStore here
});
The above function is invoked on tap of a list item. If the category is ‘TestLinksList’ then I have to assign a new store and display and display the view using ‘push’ method.
Can anyone please let me know how to assign the store for the view in controller.
You could just to this (assuming your xtype extends
Ext.List):this.getHome().push({ xtype: rec.data.category, store: testStore });