PDA

View Full Version : Accessing and Reloading a Store



netnutmike
12 Jun 2012, 8:19 AM
Hi, sorry for what is probably a silly question.

I am working on a new app, my first using the MVC architecture (which is probably my problem).

It is a simple dashboard with graphs. I want to reload the stores every 5 minutes so I have created a handler and did a setInterval. In the handler I have:


MyApp.store.SourceByDayStore.load();

I get the error that says load is not a function. I tried just using the store name but it was not found.

How do you access the store when using the MVC application architecture?

Fire-Dragon-DoL
12 Jun 2012, 10:26 AM
I think you should use Ext.getStore('StoreName').load()

If you are under a controller, you can do the same with this.getStore

netnutmike
12 Jun 2012, 10:43 AM
Yep, that did it. ThankYou!