I basically have a window containing a formPanel with elements that are shared in several places. This means that the formPanel elements may be slightly different. (type of controls).
I was able to dynamically clean and add custom buttons for the corresponding situation in the window.
But I am having a little problem with formPanel elements.
Delving into the source, I found that the initComponent Ext.Container method has this small piece of code:
var items = this.items;
if(items){
delete this.items;
if(Ext.isArray(items)){
this.add.apply(this, items);
}else{
this.add(items);
}
}
This is similar to what I am trying to achieve. Removing all current elements and then calling formPanel.add will call this code again:
if(!this.items){
this.initItems();
}
. .
, , / , childNodes/items dom.children dom.innerHTML.
, formPanel , , .
formPanel.doLayout() / .
formPanel.remove , formPanel, , , , -/, .
, / dom.children dom.innerHTML?
.
ExtJS 2.1, .