Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha User
    Join Date
    Nov 2010
    Posts
    16
    Vote Rating
    0
    gs76pl is on a distinguished road

      0  

    Default [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

  2. #2
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    17,006
    Vote Rating
    650
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  

    Default


    This isn't a bug. dataModelSearchPanel is missing a layout.
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

Similar Threads

  1. Problem with nested border layouts
    By matthewadams in forum Ext 2.x: Help & Discussion
    Replies: 6
    Last Post: 1 Jul 2009, 9:35 PM
  2. Nested border layouts
    By Northie in forum Ext 2.x: Help & Discussion
    Replies: 15
    Last Post: 25 Feb 2009, 5:56 AM
  3. Replies: 9
    Last Post: 16 Nov 2008, 9:04 AM
  4. Scrolling nested border layouts
    By knight9 in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 28 Nov 2007, 10:54 AM

Thread Participants: 1