View Full Version : me.el null on window items

6 Feb 2013, 7:29 AM
I'm trying to use Ext.window.Window with a form inside a normal html page (not created with a viewport).

It works great normaly. But then I have a drag and drop code that, after moving blocks around, it updates the whole body of the page with code coming from an ajax call.

After I do that, when I create the window and then "show()", it throws an error on the code:

if (!me.container) {

me.container = Ext.get(me.el.dom.parentNode);

The error is: "Uncaught TypeError: Cannot read property 'dom' of null"

This is in the "finishRender" method of the "Ext.util.Renderable" class.

It seems the "el" is null when it reaches the "header" element of the window. But then I tried to disable the header and it had the same problem with the "form" element.

I'm really lost with this one.

Thank you.

8 Feb 2013, 11:13 AM
Do you remove anything and then add it back? Not a whole lot to actually go off on here.

26 Feb 2013, 7:26 AM
I've noticed that it can happen if an exception raises inside a Controller init call.

Here is the case :
Have a controller that controls any component :

this.control({'#MyWindowItem' : { beforerender:this.beforeViewportRender }});

Declare a function beforeViewportRender on this Controller :

return true;

Now if you do
try {
} catch (e) {console.log(e.message);}
return true;
You'll see in console :
thisFieldIsNotDefined is not defined