If you find yourself thinking:
I suggest to try one of the two following solutions
- Is there a way to use multiple instances of views in extjs
- I've created app that uses two instances of the same view in it. There are two controllers (each controller controls corresponding instance of view). When one of the instances fires event handlers in both controllers are called.
- How to manage two instances of the same view to have different stores
The problem
You've created view. And now you realize that there is going to be a couple of instances of this view in your app (for example, there is going to be 2 identical grids but having different stores and different event handlers).
Solution
Let's say your view looks like this one:Also you have 2 stores
Store1
and Store2
and two controllers.
Solution 1
In order to manage multiple instances ofTestView
you may create two additional views:
In this case your viewport should be looking like the following one:
Now you are able to manage both views by controllers using views'
xtype
s:
No comments:
Post a Comment