I am in the app.js file. there is a function that gets executed when user logs in to the stytem successfully;
loginSuccess: function() {
this.getViewport().getLayout().setActiveItem(1).store.load(); // Calls the Store of the i need to navigate
this.getViewport().getLayout().setActiveItem(1); // The view i will be navigating
}
I am getting an error stating this.getViewport().getLayout().setActiveItem(1).store is undefined
. i think i'm calling the Store the wrong way. how could i correct this ? How can i call the Store from the app.js ?
UPDATE
var st = Ext.getStore('myStore');
st.load();
st.on('load', function() {
this.getViewport().getLayout().setActiveItem(1);
});