PDA

View Full Version : [FIXED-1027] Fields are not removed from BasicForm when fieldset is destroyed



AndreKR
4 Jun 2010, 8:05 AM
Ext version tested:

Ext 3.2.1

Adapter used:

ext

css used:

only default ext-all.css

Browser versions tested against:

FF3 (firebug 1.5.4 installed)

Operating System:


WinXP Pro

Description:

When I call getComponent('a_fieldset').destroy() the corresponding fields are not removed from the BasicForm's items, so the code doing the validation breaks.

Test Case:
See this URL : http://kundenweb.creations.de/usenet/ext_layout/ext_sandbox4.htm

Steps to reproduce the problem:

Go to test case and open Firebug or JS Console
Click Submit -> No error
Click Destroy Fieldset B
Click Submit again -> JS Error

See also:
http://www.extjs.com/forum/showthread.php?99604-Destroy-fieldset

gevik
4 Jun 2010, 12:52 PM
Please study the following code, perhaps it helps:


bbar: { items: [
{ xtype: 'button', text: 'Destroy Fieldset B', handler: function () {
var win = this.ownerCt.ownerCt;
var the_form = win.getComponent('the_form');
var fieldsetN = the_form.getComponent('fieldset_b');
the_form.remove(fieldsetN);
win.syncShadow();
}},

evant
7 Jun 2010, 11:14 PM
A fix for this has been added to SVN. Thanks for the report.