View Full Version : Question about getting refs to stores

24 Jan 2012, 1:09 PM
I am updating my application to work with PR4, and when I was using PR3 I was able to get a reference to a store from the Application instance like so:


This probably was not the right way in the first place, but was just something I picked up I could do as I first started using the API.

This is no longer supported under PR4, so what's the best way for me to reference a store from one of controller files? Would I need to define a ref to one of the stores I wish to use? Or should I just use the StoreManager object and retrieve via the storeId?


24 Jan 2012, 3:26 PM
Your best bet for Stores is always Ext.getStore('StoreId'). Stores are a little different to Models and Views in that there's usually only one instance of each so we can address them by ID.