简体   繁体   中英

ExtJS 4.2 How can I get all the stores of a view?

I´m trying to obtain all the stores of a view in a controller. For example my view is a panel that has 2 grids and 4 combos,every one has his own store. Is there a way to obtain all the stores using Ext.ComponentQuery or something like this.Ext.StoreManager returns all the stores of the app,I only want the stores of a specific view.

If you have a component that does have a store that is not bound using the store property, bad luck. But if you are only working with basic ExtJS components like grid and combo, you may try whether

view.query("[store]").map(function(cmp) {return cmp.getStore() });

does what you want...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM