PDA

View Full Version : [SOLVED]Can't dynamically 'refresh' fieldset.



edykstra
9 Jun 2009, 10:08 AM
Hello,

I have a form that contains 4 Text Fields followed by a Field Set. The contents of the Field Set are variable and are therefore created dynamically.

When the form is first created, the Field Set looks perfect. However, when the window containing the form is closed, and then reopened, the Field Set is empty. Why?

The same thing happens when the window remains open and a listener, attached to one of the 4 Text Fields, causes the Field Set to be 'updated'. The code then sees the Field Set exists, and removes/destroys (I've tried both) it before recreating itself with new contents and adding it back to the form. Again - the Field Set is there, but empty.

I have walked through the Javascript with Firebug, and watched variables. Everything looks good. (Obviously I'm wrong ... but I don't see the issue.) Also, Firebug reports NO errors.

I have searched the forum, and hits were not really applicable. (Or perhaps I'll find it faster once I know what the issue is, and can then pick better keywords - but I'm not there yet.)

I'll post code if requested ... but I'm thinking this is a high level / obvious issue I just don't see.

Thanks in advance for any help,

Eric

tryanDLS
9 Jun 2009, 10:13 AM
I would suggest posting your code. Also, have you set http://extjs.com/deploy/ext-3.0-rc2/docs/?class=Ext.Window&member=closeAction for the Window?

edykstra
9 Jun 2009, 1:41 PM
Tim,

Solved.

I was dealing with new functionality in ExtJS and assumed I had some of that wrong. Turns out it was a JavaScript 101 typo/issue - variable scope! :) Found it while I was creating a working code example to post.

Murphy says I won't find the issue until immediately after I post. So - does that mean I should post right away, or try hard myself first? Answer - I should create a working code example right away, and post it if it didn't resolve the issue. But, I guess you knew that - hence the code request. :)

Cheers,

Eric