Ext


Go Back   Ext JS Forums > Ext JS Community Forums (3.0) > Ext: Bugs

Reply
 
Thread Tools
  #1  
Old 09-08-2009, 10:30 AM
Condor's Avatar
Condor Condor is offline
Ext JS - Community Support Team
 
Join Date: Mar 2007
Location: The Netherlands
Posts: 14,250
Condor is on a distinguished road
Default [FIXED-265][3.0.0] TableLayout needs isValidParent implementation

TableLayout.isValidParent currently always returns true, making it impossible to move components to a table layout (example here).

Suggested fix:
Ext.override(Ext.layout.TableLayout, {
    renderItem : function(c, position, target){
        if(c && !c.rendered){
            c.render(this.getNextCell(c));
            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).
__________________
Condor
Reply With Quote
  #2  
Old 09-24-2009, 03:16 AM
Condor's Avatar
Condor Condor is offline
Ext JS - Community Support Team
 
Join Date: Mar 2007
Location: The Netherlands
Posts: 14,250
Condor is on a distinguished road
Default

*** Bump ***
__________________
Condor
Reply With Quote
  #3  
Old 09-24-2009, 06:06 AM
Animal's Avatar
Animal Animal is offline
Ext JS - Community Support Team
 
Join Date: Mar 2007
Location: East Midlands, UK
Posts: 23,352
Animal will become famous soon enough
Default

+1

isValidParent is a neglected necessity for layouts which allow dynamic movement of rendered items.
__________________
ExtJs forum volunteer. No official connection to the Ext Company. I do not speak for them.
ExtJs consultancy offered. £ 50/hour. Evenings+weekends. the_bagbournes@btinternet.com

Search the forum: http://www.google.com/coop/cse?cx=01...%3Az7of1ufqccu
Read the docs too: http://extjs.com/deploy/dev/docs/
See Saki's samples: http://examples.extjs.eu/
Build your own Ext: http://extjs.com/products/extjs/build/
Scope: http://extjs.com/forum/showthread.ph...642#post257642
Reply With Quote
  #4  
Old 09-25-2009, 12:51 AM
evant's Avatar
evant evant is offline
Ext JS - Development Team
 
Join Date: Apr 2007
Location: Sydney, Australia
Posts: 8,188
evant is on a distinguished road
Default

Fix applied to svn in rev #5411 for patch release 3.0.3.
__________________
Evan Trimboli
Ext JS - Core Development Team
evan@extjs.com
Reply With Quote
  #5  
Old 11-03-2009, 01:18 PM
paolocavelli paolocavelli is offline
Ext JS Premium Member
 
Join Date: Aug 2008
Location: Turin, Italy
Posts: 12
paolocavelli is on a distinguished road
Default 3.0.3 table layout implementation : isValidParent()

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?
Reply With Quote
  #6  
Old 11-04-2009, 02:50 AM
Condor's Avatar
Condor Condor is offline
Ext JS - Community Support Team
 
Join Date: Mar 2007
Location: The Netherlands
Posts: 14,250
Condor is on a distinguished road
Default

Could you post a layout that produces this error?
__________________
Condor
Reply With Quote
  #7  
Old 11-05-2009, 10:29 AM
paolocavelli paolocavelli is offline
Ext JS Premium Member
 
Join Date: Aug 2008
Location: Turin, Italy
Posts: 12
paolocavelli is on a distinguished road
Default

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
Thanks.
Moved again to thread http://www.extjs.com/forum/showthread.php?p=405830
Reply With Quote
Reply

Thread Tools

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

All times are GMT -5. The time now is 09:50 AM.

© 2006-2009 Ext, LLC
Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.