PDA

View Full Version : [INFOREQ] ExtJs 3.1.1 setVisible fieldset



brk11
17 Feb 2010, 6:59 AM
I have a hidden fieldset with 2 numberfields and when I want to turn it visble (using setVisble method) the fieldset appears but not its items.

This worked fine at 3.1 version.

brk11
17 Feb 2010, 7:39 AM
I think the problem could be at cascade method of fieldset. When I try to apply for each item of the fieldset a function like this:



var showField = function(field) {
field.setVisible(true);
}

var testFs = new Ext.form.FieldSet({
title: 'Test',
hidden: true,
items: [a,b]
});

testFs.cascade(showField);


There is no difference if items a or b are proviously hidden or not.

mystix
17 Feb 2010, 9:38 AM
it would help if you could post a full working test-case (preferably one that can be dropped directly into the examples directory). the following template should serve as a good guide: http://www.extjs.com/forum/showthread.php?t=71015

thanks.

brk11
18 Feb 2010, 3:26 AM
I'm trying to make a little example to show my problem, but I can't reproduce what is happening to me.

I solve my problem applying doLayout method after the cascade finishes.

fs.cascade(enableFieldSet);
fs.doLayout();

It's very strange, because in some cases I don't need to apply the doLayout and in any case when I use the 3.1 version...

The "problem" occurs when I select a value in a ComboBox that enables/show a whole hidden fieldset (the fieldset appears, but empty). However, if I execute the same line of code (cascade) out of 'select' listener of the combobox, it runs correctly. But I've tried to reproduce all these cases in a test example, but it runs really well...

I'm worried abuot that, because is a very particular situation and I don't know how to contribute to solve it.

Any idea?

brk11
18 Feb 2010, 3:59 AM
Definitely, it seems a doLayout problem... Do you know about any change from 3.1 to 3.1.1 that could produce this situation?

mystix
18 Feb 2010, 7:58 AM
i believe the layout mechanism was changed significantly between 3.1 and 3.1.1.

will need the Devs to chime in on this.
however, without a failing test case, it'd be quite hard to verify the presence of a bug.

evant
18 Feb 2010, 7:59 AM
Marc is correct, it's not possible to tell without a test case.