-
30 Mar 2011 4:15 AM #1
[CLOSED]nested layouts fit/border render nothing on a screen
[CLOSED]nested layouts fit/border render nothing on a screen
hi,
There seems to be a problem while nesting border layout into fit layout or border layout with a different border layout. The upshot is that dynamically including some other panel renders nothing on a screen. The only time when i can see something is when XX.data.model.OtherPanel has a height specified explicitly (but i shouldn't do that as this panel uses fit layout !!!)
my configuration
Code:Ext.define('XX.data.DataPanel', { extend : 'Ext.panel.Panel', title : 'Data', initComponent: function() { var mainContainer = new Ext.panel.Panel({ layout : 'border', items : [{ region : 'north', autoHeight :true, items : [] },{ region : 'center', id : 'dataModelSearchPanel' }] }); Ext.apply(this, { items: [ mainContainer] }); XX.data.DataPanel.superclass.initComponent.apply(this, arguments); this.addOtherPanel(); //originally called from a click button } addOtherPanel : function(){ var searchPanel = Ext.getCmp('dataModelSearchPanel'); searchPanel.removeAll(); searchPanel.add(Ext.create('XX.data.model.OtherPanel')); searchPanel.doLayout(); } }); Ext.define('XX.data.model.OtherPanel', { extend : 'Ext.panel.Panel', layout : 'fit', // height : 400, // layout : 'border', initComponent : function(){ this.items = [ { xtype : 'panel', layout: 'border', id : 'yyy', items : [{ xtype : 'panel', region : 'north', height : 200, //autoHeight : true, title :'c2222' }, { xtype : 'panel', region: 'center', title :'rrrrc2222' }] }]; /* //this doesn't work either when used with 'border' layout this.items = [{ xtype : 'panel', region : 'north', height : 200, //autoHeight : true, title :'c2222' }, { xtype : 'panel', region: 'center', height : 300, title :'rrrrc2222' }];*/ XX.data.OtherPanel.superclass.initComponent.apply(this, arguments); } });Last edited by evant; 30 Mar 2011 at 6:09 PM. Reason: [code][/code] tags
-
30 Mar 2011 6:19 PM #2
This isn't a bug. dataModelSearchPanel is missing a layout.
Evan Trimboli
Sencha Developer
Twitter - @evantrimboli
Don't be afraid of the source code!
Thank you for reporting this bug. We will make it our priority to review this report.
Similar Threads
-
Problem with nested border layouts
By matthewadams in forum Ext 2.x: Help & DiscussionReplies: 6Last Post: 1 Jul 2009, 9:35 PM -
Nested border layouts
By Northie in forum Ext 2.x: Help & DiscussionReplies: 15Last Post: 25 Feb 2009, 5:56 AM -
[2.2] Viewport with nested border layouts - bug in FF3
By y0y in forum Ext 2.x: BugsReplies: 9Last Post: 16 Nov 2008, 9:04 AM -
Scrolling nested border layouts
By knight9 in forum Ext 2.x: Help & DiscussionReplies: 2Last Post: 28 Nov 2007, 10:54 AM


Reply With Quote