[Users] LayerNode with radio button
Andreas Hocevar
ahocevar at opengeo.org
Sun Dec 5 00:56:43 CET 2010
Hi,
just configure the node with a uiProvider. See comment inline.
On Dec 4, 2010, at 19:28 , Hugo wrote:
> Hello all,
>
> 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:
>
> var lagosLayerNode = new GeoExt.tree.LayerNode({
> layer: mlago,
> leaf: true,
Remove the loader config below, and instead just add:
uiProvider: "layernodeui"
> loader: {
> baseAttrs: {
> radioGroup: 'theme',
> uiProvider: 'layernodeui'
> }
> }
> });
>
Regards,
Andreas.
> var layerTree = new Ext.tree.TreePanel({
> title: 'Temas',
> layout: 'fit',
> root: layerRoot,
> rootVisible: false,
> loader: new Ext.tree.TreeLoader({applyloader: false}),
> enableDD: false,
> autoScroll: true,
> expanded: true,
> border: true,
> plugins: [
> new GeoExt.plugins.TreeNodeRadioButton({
> listeners: {
> 'radiochange': function(node) {
> selLayer = node.layer;
> featureInfo.layers = [selLayer];
> }
> }
> })
> ],
> loader: new Ext.tree.TreeLoader({
> applyLoader: false,
> uiProviders: {
> 'layernodeui': LayerNodeUI
> }
> })
> });
>
> layerRoot.appendChild(themeNode);
> themeNode.appendChild(magua);
> magua.appendChild(riosLayerCont);
> magua.appendChild(lagosLayerNode);
>
> So it works when i append riosLayerCont but doesn't when appending lagosLayerNode.
> Any help? What am i doing wrong here?
>
> Thanks a lot. Best regards,
>
> Hugo
>
>
> --
> Hugo Martins
> LabNT - ISEGI UNL
> Campus de Campolide
> 1070-312 Lisboa
> N 38°43'56.84", W 9°9'35.74"
> _______________________________________________
> Users mailing list
> Users at geoext.org
> http://www.geoext.org/cgi-bin/mailman/listinfo/users
--
Andreas Hocevar
OpenGeo - http://opengeo.org/
Expert service straight from the developers.
More information about the Users
mailing list