Results 1 to 2 of 2

Thread: [CLOSED]nested layouts fit/border render nothing on a screen

    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
      0  

    Default [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 User evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    18,984
    Vote Rating
    933
      0  

    Default

    This isn't a bug. dataModelSearchPanel is missing a layout.
    Twitter - @evantrimboli
    Former Sencha framework engineer, available for consulting.
    As of 2017-09-22 I am not employed by Sencha, all subsequent posts are my own and do not represent Sencha in any way.

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •