Reputation: 3198
I have two stores:
And two views
In each of them I want to reference different Files store. If I put only 'Files' in the views store property
store: 'Files'
then I get the same store in both cases. Putting '[email protected]' doesn't work.
How should I reference them to get the proper store in the second view?
Thanks!
Upvotes: 2
Views: 1379
Reputation: 23975
That is because of a ExtJS MVC convetion which will do the following:
Split up the FQN by '@' and use the first part as storeId which will override any storeId that is predefined. The MVC is expecting each store to be singleton and don't take credit of any additional namespace if you use the @ syntax that way.
Try to register the stores (views/models) like
stores:['aaa.Files','bbb.Files']
ExtJS will now take care of the namespace but you will need to use it!
So the storeId are now: 'aaa.Files' and 'bbb.Files' which.
Upvotes: 2