Hi Phil, the createNode method in GeoExt is intentionally very basic, because part of the Ext JS API is that applications can override it as they need. See my reply to the other thread a few minutes ago.
Andreas. On Fri, Jul 15, 2011 at 4:22 AM, Phil Scadden <[email protected]> wrote: > I want to be able to assign href,hrefTarget and qtip on a per layer > basis to a layer tree. If these attributes are added to layer, then I > can do with easily with change below (sorry, I dont know how to turn > this into a GeoExt patch). Change is createNode in layerloader.js > > Old function > createNode: function(attr) { > if(this.baseAttrs){ > Ext.apply(attr, this.baseAttrs); > } > if(typeof attr.uiProvider == 'string'){ > attr.uiProvider = this.uiProviders[attr.uiProvider] || > eval(attr.uiProvider); > } > attr.nodeType = attr.nodeType || "gx_layer"; > > return new Ext.tree.TreePanel.nodeTypes[attr.nodeType](attr); > }, > > New function > createNode: function(attr) { > if (attr.layer.href) { > attr.href = attr.layer.href; > attr.cls = 'linknode'; > if (attr.layer.hrefTarget) attr.hrefTarget = > attr.layer.hrefTarget; > } > if (attr.layer.qtip) attr.qtip = attr.layer.qtip; > if(this.baseAttrs){ > Ext.apply(attr, this.baseAttrs); > } > if(typeof attr.uiProvider == 'string'){ > attr.uiProvider = this.uiProviders[attr.uiProvider] || > eval(attr.uiProvider); > } > attr.nodeType = attr.nodeType || "gx_layer"; > > return new Ext.tree.TreePanel.nodeTypes[attr.nodeType](attr); > }, > > > > Notice: This email and any attachments are confidential. If received in error > please destroy and immediately notify us. Do not copy or disclose the > contents. > > _______________________________________________ > Dev mailing list > [email protected] > http://www.geoext.org/cgi-bin/mailman/listinfo/dev > -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. _______________________________________________ Dev mailing list [email protected] http://www.geoext.org/cgi-bin/mailman/listinfo/dev
