View Full Version : [OPEN] [FIXED-265][3.0.0] TableLayout needs isValidParent implementation

8 Sep 2009, 6:30 AM
TableLayout.isValidParent currently always returns true, making it impossible to move components to a table layout (example here (http://www.extjs.com/forum/showthread.php?t=79796)).

Suggested fix:

Ext.override(Ext.layout.TableLayout, {
renderItem : function(c, position, target){
if(c && !c.rendered){
this.configureItem(c, position);
}else if(c && !this.isValidParent(c, target)){
var container = this.getNextCell(c);
container.insertBefore(c.getDomPositionEl().dom, null);
c.container = Ext.get(container);
this.configureItem(c, position);
isValidParent : function(c, target){
return c.getDomPositionEl().up('table.x-table-layout', 5).dom.parentNode === (target.dom || target);

The only thing that is still missing is support for 'position', but I don't see how that can be implemented without breaking colspan/rowspan (at least, not without using a lot of code).

23 Sep 2009, 11:16 PM
*** Bump ***

24 Sep 2009, 2:06 AM

isValidParent is a neglected necessity for layouts which allow dynamic movement of rendered items.

24 Sep 2009, 8:51 PM
Fix applied to svn in rev #5411 for patch release 3.0.3.

3 Nov 2009, 10:18 AM
I have problems with 3.0.3 table layout implementation.
I create many panels with table layout; after some creation (5 or 6) Safari and IE browsers return error on the line:

return c.getDomPositionEl().up('table', 5).dom.parentNode === (target.dom || target);because c.getDomPositionEl().up("table",5) is null.
With 3.0.0 I have no problem and I saw that this code is new for 3.0.3.
Any help?

3 Nov 2009, 11:50 PM
Could you post a layout that produces this error?

5 Nov 2009, 7:29 AM
With new tests, I realized that the problem arise only using Ext.ux.ManagedIFrame.Panel
I'm switching to thread http://www.extjs.com/forum/showthread.php?p=405272
Moved again to thread http://www.extjs.com/forum/showthread.php?p=405830