PDA

View Full Version : Changing the content of a viewport doesn't work



dobberph
22 Aug 2012, 1:36 AM
Hi all,

I'm using ExtJS 4.1 with architect 2.1.
I have two views (two gridpanels each with another store) and a viewport.
In the controller I have a function that should change the content of my viewport between the two gridpanels.
The function goes as follws:


changeView: function(combobox, newVal, oldVal, options) {

Ext.getCmp('myViewport').removeAll();
if (newVal == "Gruppenstrahler") {
newContent = Ext.create('pruefkoepfeApp.view.view_gruppenstrahler');
} else if (newVal == "Kontakttechnik"){
newContent = Ext.create('pruefkoepfeApp.view.view_kontakttechnik');
}
Ext.getCmp('myViewport').add(newContent);
Ext.getCmp('myViewport').update();

}


The function is loaded but the content is not completely changed. This means that the other view is completly loaded but the store remains the old one.

I have no idea where I can search for the bug.
Can somehelp me please?

Thanks,
Tobias

EDIT: The error was in another part of my code ... Sorry.