[Users] Change Image Icon for layers nodes in TreePanel GeoExt 1.1

Joaquin Carrasco Gallego jcarrascog at gmail.com
Thu Sep 11 18:23:20 CEST 2014


Hi everyone, I am trying to change the image icon of a layer node in a 
TreePanel but always shows me the default one of the class 
".x-tree-node-leaf .x-tree-node-icon". Searching for Internet  in some 
pages the createNode function is mention in a loader, but I am trying it 
and it doesn´t works. Some help is appreciated. Here is my code:


var treeConfig = [ {
                 nodeType : "gx_baselayercontainer",
                 text : "Ortofotos"
             }, {
                 nodeType : "gx_overlaylayercontainer",
                 text : "Capas Vectoriales",
                 expanded : true,
                 // render the nodes inside this container with a radio 
button,
                 // and assign them the group "foo".
                 loader : {
                     baseAttrs : {
                         radioGroup : "foo",
                         uiProvider : "layernodeui",
                     },
                       createNode: function(attr) {
                        attr.iconCls = "nuevaClase";
                        return 
  GeoExt.tree.LayerParamLoader.prototype.createNode.apply(this, attr);
                     }
                 }
             } ];

Thanks!!!


More information about the Users mailing list