Roo/bootstrap/layout/Border.js
[roojs1] / Roo / bootstrap / layout / Border.js
index b0cf363..d92fdf6 100644 (file)
@@ -77,6 +77,14 @@ Roo.extend(Roo.bootstrap.layout.Border, Roo.bootstrap.layout.Manager, {
         if(this.updating) {
             return;
         }
+        
+        // render all the rebions if they have not been done alreayd?
+        Roo.each(Roo.bootstrap.layout.Border.regions, function(region) {
+            if(this.regions[region] && !this.regions[region].bodyEl){
+                this.regions[region].onRender(this.el)
+            }
+        },this);
+        
         var size = this.getViewSize();
         var w = size.width;
         var h = size.height;
@@ -287,13 +295,18 @@ layout.addxtype({
             delete cfg.items;
         }
         var nb = false;
+       
+       if (cfg.region == 'center') {
+           Roo.log("Center" + cfg.title);
+       }
+       
         
         switch(cfg.xtype) 
         {
             case 'Content':  // ContentPanel (el, cfg)
             case 'Scroll':  // ContentPanel (el, cfg)
             case 'View': 
-                cfg.autoCreate = true;
+                cfg.autoCreate = cfg.autoCreate || true;
                 ret = new cfg.xns[cfg.xtype](cfg); // new panel!!!!!
                 //} else {
                 //    var el = this.el.createChild();
@@ -355,7 +368,7 @@ layout.addxtype({
                 ret = new cfg.xns[cfg.xtype](cfg); // new panel!!!!!
                 
                 this.add(region, ret);
-                
+                /*
                 if (cfg.background) {
                     // render grid on panel activation (if panel background)
                     ret.on('activate', function(gp) {
@@ -366,6 +379,7 @@ layout.addxtype({
                 } else {
                   //  cfg.grid.render(el);
                 }
+                */
                 break;