+ if (cfg.xtype && cfg.xtype.match(/^Roo\./) && !cfg.xns) {
+ // xtype contains full path..
+ var bits = cfg.xtype.split('.');
+ bits.shift(); // remove roo..
+ cfg.xtype = bits.pop(); // get the last bit..
+ cfg.xns = Roo;
+ while (bits.length) {
+ cfg.xns = cfg.xns[bits.shift()];
+ }
+
+ }
+ if (cfg.xtype) {
+ if (!cfg.xns || typeof(cfg.xns[cfg.xtype]) == 'undefined') {
+ throw "Invalid Xtype " + cfg.xtype + ' on ' + cfg.xtreepath;
+ }
+ }
+ if (!isListener) {
+ cfg.listeners = cfg.listeners || {};
+ }