I have 2 panels (center panel and west panel). the first one (west panel) have a button. What i want to do is that when i click on my button, my form appear on the center pannel. For that i have used this code
Code:
xtype:'button',     
 text: 'Button 1',      
handler: function(){ replace(cardWizard, 'wizard');
}
Code:
var currentName;
 var replace = function(config, name) { 
                     var cp = Ext.getCmp('centerPanel');
                     if (name && name != currentName) { 
                       currentName = name;                     
                        cp.remove(0);                    
                        cp.add(Ext.apply(config));   }
                  }
Now when i click on my button, my form appear, in second time the component of my form start deseapearing, once time again, the same thing arrives until the total dispearance of the form. It's like the add() fonction work only one time. it is the best ways i have done it? why my form deseaper? i want to set up a small software with button on west panel and form on center panel.