Hello all,<br><br>I've been able to create node inside a tree using the radiobutton plugin. However, im'not able to aply it into a single LayerNode. I have a tree with a folder (node) that will contain several other folders (nodes) and layers (leaf nodes). Because i want to achieve a specific node order inside the tree i've been using both LayerConatiner and LayerNode. The problem is with the latest. Here is the relevant part of the code:<br>
<br>var layerRoot = new Ext.tree.TreeNode({});<br><br>var themeNode = new Ext.tree.TreeNode({<br> text: 'Cartografia Temática',<br> expandable: true,<br> expanded: true<br>});<br><br>var magua = new Ext.tree.TreeNode({<br>
text: 'Massas de água por categoria',<br> expandable: true,<br> expanded: false<br>});<br><br>var riosLayerStore = new GeoExt.data.LayerStore({<br> map: map,<br> initDir: 0,<br> layers: [mrios, martif]<br>
});<br> <br>var lagosLayerStore = new GeoExt.data.LayerStore({<br> map: map,<br> initDir: 0,<br> layers: [mlago]<br>});<br><br>var riosLayerCont = new GeoExt.tree.LayerContainer({<br> text: 'Rios',<br>
layerStore: riosLayerStore,<br> expanded: false,<br> loader: {<br> baseAttrs: {<br> radioGroup: 'theme',<br> uiProvider: 'layernodeui'<br> }<br>
}<br>});<br><br>var lagosLayerNode = new GeoExt.tree.LayerNode({<br> layer: mlago,<br> leaf: true,<br> loader: {<br> baseAttrs: {<br> radioGroup: 'theme',<br> uiProvider: 'layernodeui'<br>
}<br> }<br>});<br><br>var layerTree = new Ext.tree.TreePanel({<br> title: 'Temas',<br> layout: 'fit',<br> root: layerRoot,<br> rootVisible: false,<br> loader: new Ext.tree.TreeLoader({applyloader: false}),<br>
enableDD: false,<br> autoScroll: true,<br> expanded: true,<br> border: true,<br> plugins: [<br> new GeoExt.plugins.TreeNodeRadioButton({<br> listeners: {<br> 'radiochange': function(node) {<br>
selLayer = node.layer;<br> featureInfo.layers = [selLayer];<br> }<br> }<br> })<br> ],<br> loader: new Ext.tree.TreeLoader({<br>
applyLoader: false,<br> uiProviders: {<br> 'layernodeui': LayerNodeUI<br> }<br> })<br>});<br> <br>layerRoot.appendChild(themeNode);<br>themeNode.appendChild(magua);<br>
magua.appendChild(riosLayerCont);<br>magua.appendChild(lagosLayerNode);<br><br>So it works when i append riosLayerCont but doesn't when appending lagosLayerNode.<br>Any help? What am i doing wrong here?<br><br>Thanks a lot. Best regards,<br>
<br>Hugo<br><br clear="all"><br>-- <br>Hugo Martins<br>LabNT - ISEGI UNL<br>Campus de Campolide<br>1070-312 Lisboa<br>N 38°43'56.84", W 9°9'35.74"<br>