PDA

View Full Version : Destroy components in FormPanel



guyfawkes
16 Jun 2010, 11:39 PM
I have FormPanel which contains components with user-setted ids:


this.orderPropPanel = new Ext.FormPanel({
title: conf.messages.common_data,
layout: 'form',
region: 'center',
labelWidth: 150,
frame: true,
defaults: { autoHeight: true },
items: [
new Ext.form.FieldSet({
style: 'padding: 5px',
title: 'Customer',
defaults: { anchor: '100%', readOnly: true },
items: [
{
xtype: 'textfield',
id: 'ov_c_name',
fieldLabel: 'Name'
},
{
xtype: 'textfield',
id: 'ov_c_email',
fieldLabel: 'E-mail'
}
]
}), (etc.)

So, when Panel which contains this FormPanel is closed, all other components, include FormPanel itself is destroyed and deleted from the DOM tree, but components with user, non-generated ids not destroying and they still there are in DOM tree. How to fix it?
Sorry for my English.

guyfawkes
17 Jun 2010, 4:26 AM
Up!

Animal
17 Jun 2010, 4:44 AM
The reason for no answers is because nobody understands.

Removing a Component destroys it by default.

guyfawkes
17 Jun 2010, 10:05 PM
What do you not understand? You never have same problem?
Why components are still in DOM tree when Panel closed? I see it with Firebug. All components with extJS-generated ids remove from DOM tree, but this components are not removed.

Animal
17 Jun 2010, 11:30 PM
I don't understand this: "All components with extJS-generated ids remove from DOM tree, but this components are not removed."