},
/**
- * Adds a xtype elements to the panel - currently only supports Forms.
+ * Adds a xtype elements to the panel - currently only supports Forms, View, JsonView.
* <pre><code>
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;
}
- 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(cfg.xtype) > -1) {
+ // views..
+ cfg.el = this.el;
+ // factory?
+ var ret = new Roo[cfg.xtype](cfg);
+ ret.render(false, ''); // render blank..
+ return ret;
+
+ }
+ return false;
}
});
*/
Roo.GridPanel = function(grid, config){
- if (typeof(config) == 'undefined') { // xtype construction..
- config = grid;
- grid = Roo.factory(config.grid, Roo);
- }
+
this.wrapper = Roo.DomHelper.append(document.body, // wrapper for IE7 strict & safari scroll issue
{tag: "div", cls: "x-layout-grid-wrapper x-layout-inactive-content"}, true);