-
18 Feb 2013 5:27 AM #1
Grid / Panel is rendered twice
Grid / Panel is rendered twice
Hello,
i have a problem after changing to 4.2.0 RC.
Using the MVC-architecture for my app i realize that every panel is rendered twice und events are registered and executed twice.
After clicking on the treepanel the controller is registered and content is loaded to the main tab.
Now clicking on the actioncolumn of the grid, the event for this is executed twice.
Has anyone similar behaviour? Any ideas how this come? How to prevent / debug?
Thanks in advance.
Michi
-
18 Feb 2013 12:37 PM #2
After searching i found out, that the init function of the controller are executed twice - and so the events are registered twice.
I want to show how i add the controller:
Clicking on the item of the menue-tree:
In the launch function of the maincontroller of the app this event is registeredPHP Code:this.getController(addTabController); //addTabController is the name of the controller
The function "newControllerAdded" looks likePHP Code:this.controllers.addListener('add', this.newControllerAdded, this);
Under 4.1.1 this all works fine - in 4.2.0 i have to comment the //ctrlr.init(); then it works!PHP Code:newControllerAdded : function(idx, ctrlr, token) {
ctrlr.init();
},
Has anyone an explanation for this behaviour?
Thanks!
Michi
-
18 Feb 2013 2:29 PM #3
4.2.x will automatically initialize the controller when you call getController.
Evan Trimboli
Sencha Developer
Twitter - @evantrimboli
Don't be afraid of the source code!
Looks like we can't reproduce the issue or there's a problem in the test case provided.


Reply With Quote