View Full Version : Ext.Message and this.dom is undefined

17 Nov 2011, 1:39 PM
Occasionally when using the wait attribute on a form submittal or the Ext.Msg.alert with an OKCANCEL attribute defined, I will receive an error deep within the Ext.Element stating that this.dom is undefined when trying to set a style attribute.

The stack appears to be coming from the wait method in the Ext.Message. It only seems to happen after the first time you submit the form. Not sure why or what is happening, but any insight into the matter would be hugely helpful. Thanks.

18 Nov 2011, 11:03 AM
So you do a Ext.Message.wait() during a forum submit? What version of Ext JS 3 are you using and what line?

18 Nov 2011, 12:14 PM
So you do a Ext.Message.wait() during a forum submit? No, I'm actually using the waitMsg attribute in the obj.form.load functionWhat version of Ext JS 3 are you using and what line? I'm using Ext 3.4.0 and the error is thrown on line 2933, this.dom.style[chkCache(style)] = value, of ext-all-debug.js (I'm using FireFox 7, but issue occurred in 6 as well). Here is the stack trace:

setStyle(prop=Object { display="none"}, value="none")ext-all-debug.js (line 2933)
setDisplayed(value="none")ext-all-debug.js (line 3513)
show(options=Object { title="Loading", msg="This may take a moment to complete", buttons=false, more...})ext-all-debug.js (line 29067)
wait(msg="This may take a moment to complete", title="Loading", config=undefined)ext-all-debug.js (line 29177)
beforeAction(action=Object { form={...}, options={...}, reader={...}, more...})ext-all-debug.js (line 43723)
doAction(action=Object { form={...}, options={...}, reader={...}, more...}, options=Object { url="/ajax/ajax_interface_gather.cfm", params={...}, method="post", more...})ext-all-debug.js (line 43644)
load(options=Object { url="/ajax/ajax_interface_gather.cfm", params={...}, method="post", more...})ext-all-debug.js (line 43672)
setLoad(obj=Object { initialConfig={...}, more...})form.js (line 561)
loadPanel(obj=Object { initialConfig={...}, more...}, params=Object {more...})form.js (line 134)

One other thing worth noting is that the first time I used the form it works perfectly well, the second time I used the form (after destroying it's container and then re-rendering it) it throws this error.

18 Nov 2011, 1:48 PM
The issue was that we were using a Window Manager and destroying those windows associated to that window manager when we destroy the container. It turns out that it was destroying the Ext.Message object.