Roo/ContentPanel.js
authorAlan Knowles <alan@akbkhome.com>
Mon, 26 Jul 2010 05:56:58 +0000 (13:56 +0800)
committerAlan Knowles <alan@akbkhome.com>
Mon, 26 Jul 2010 05:56:58 +0000 (13:56 +0800)
Roo/ContentPanel.js

index 5d6bca8..759d4d8 100644 (file)
@@ -351,16 +351,20 @@ layout.addxtype({
     
     addxtype : function(cfg) {
         // add form..
-        if (!cfg.xtype.match(/^Form$/)) {
-            return false;
+        if (cfg.xtype.match(/^Form$/)) {
+            var el = this.el.createChild();
+
+            this.form = new  Roo.form.Form(cfg);
+            
+            
+            if ( this.form.allItems.length) this.form.render(el.dom);
+            return this.form;
+        }
+        if (['View', 'JsonView'].indexOf('xtype') > -1) {
+            // views..
+            
         }
-        var el = this.el.createChild();
-
-        this.form = new  Roo.form.Form(cfg);
-        
         
-        if ( this.form.allItems.length) this.form.render(el.dom);
-        return this.form;
         
     }
 });