PDA

View Full Version : Row editor and this.el.dom is undefined



vladi
28 Nov 2009, 6:25 AM
Hi there,

my problem is basicaly the same as here: http://www.extjs.com/forum/showthread.php?t=81181

I get "this.el.dom is undefined" when I open a second time a window which contains a grid and edit via roweditor. The first time roweditor opens, from the second window open nothing.

The really strange thing for me is this. If I don't open a grid record via roweditor on the first window, close the window, and then open it again, the roweditor opens nicely, next times too. :-/

I checked for ID's, called win.destroy to no avail. What can I check next.

here is my js code: http://pastebin.com/m3130bd2a + cakeform http://pastebin.com/m49549659
here is where the grid config is generated: http://pastebin.com/m3f6c9846

Thanks for you help.

Condor
28 Nov 2009, 10:42 AM
I have no idea what a 'CakeForm' is, but here are some general comments:

If you close a window you not only destroy the window, but also all components inside it. This means that you have to recreate all components (including grid editors) when you recreate the window.
I usually recommend to set closeAction:'hide' to make the window hide instead of close, so you can reuse it (not recommended for large applications, because a hidden window still takes up DOM space).

vladi
28 Nov 2009, 11:17 AM
Hi Condor,

thanks for checking this out. :) I'll try to implement what you suggested and come back here with further info. Also I edited the previous post with CakeForm code.

vladi
1 Dec 2009, 3:22 AM
I did not manage to pass over this bump. I uploaded the dev code here: link (user:test pass:t3st both logins). I can supply the all code for the backend details.

ext 3.0.3 + cakePHP1.2.5

Problem: First time I open a window that contains a editorgrid with RowEditor, the editor open correclty. Second time I open a window the RowEditor in the grid does not open and throws "this.dom is undefined".

IF the first time the window is opened, I don't open the RowEditor, close the window and the open the window again the RowEditor will start editing ok for all windows.

Thank you in advance for your help. :)

Mickey_Shu
28 Jan 2010, 10:12 PM
I have the same question!Could somebody tell me how to make it work?

LWL
21 Mar 2010, 12:10 AM
newCm:function(){
var cm=new grid.ColumnModel({
...
});
return cm;
}

newPlugin:function(){
var roweditor=new Ext.ux.RowEditor({
...
});
return roweditor;
}

grid=new Ext.grid.GridPanel({
cm:newCm(),//important! always create
plugins:[newPlugin]//important! always create
})