I would like to have different instances of the same view with different stores at the same time in an ExtJS application. At the moment i ceate multiple instances of the same view (Ext.view.View) in the viewport.
But what is the best practice to have a different store in every view? Every example that i found uses a Store-ID in the view that was created using the stores-Config of the controller. But this would use the same store for every view.
At the moment i figured the following possible solutions:
- Create an own store class for every view instance. Add all stores to controller and use different Store-ID for every view instance.
- Do not use stores of controller at all and create a new store in the initComponent of the view manually passing different parameters to each instance of the store.
- Do not use stores of controller at all and create a new store in the initComponent of the view manually. Then use load to load the store manually using different parameters for each instance of the store.
Is any of this solutions the best practice or should it be done differently?