[Users] Fwd: Tree Node with Radio Button

Hugo hfpmartins at gmail.com
Mon Apr 4 11:45:24 CEST 2011


Hello all,

I'm still struggling with this... Until the moment i had no success on
rendering a GeoExt.tree.LayerNode with the radio button plugin. My
definition of the layer node is the following:

var sessao2LayerNode = new GeoExt.tree.LayerNode({
    layer: ppsessao2,
    leaf: true,
    loader: {
       baseAttrs: {
          radioGroup: 'theme',
          uiProvider: 'layernodeui'
       }
    }
});

Nevertheless, when i add this node to the tree it is rendered with the
checkbox only. What am i doing wrong here?

Thanks.
Kind regards,

Hugo




---------- Forwarded message ----------
From: Hugo <hfpmartins at gmail.com>
Date: Wed, Mar 30, 2011 at 5:56 PM
Subject: Tree Node with children using Radio Button plugin
To: users at geoext.org


Hello all,

Is it possible to have a parent node with children rendered with and without
RadioButton? I need to include two layers inside the same parent node but i
would like to have one of them rendered with a radio button an the other
without the radiobutton (just with the checkbox). The relevant part of code
i'm using is as follows:

var LayerNodeUI = Ext.extend(GeoExt.tree.LayerNodeUI, new
GeoExt.tree.TreeNodeUIEventMixin());

var sessao2LayerNode = new GeoExt.tree.LayerNode({
    layer: ppsessao2,
    leaf: true,
    loader: {
       baseAttrs: {
          radioGroup: 'theme',
          uiProvider: 'layernodeui'
       }
    }
});

var forunspp = new GeoExt.tree.LayerNode({
    layer: locaisPP
});

var session2Node = new Ext.tree.TreeNode({
    text: '2º Fórum',
     id: 'session2node',
     expanded: false,
     expandable: true
});

var layerRoot = new Ext.tree.TreeNode({});

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) {}
                }
           })
     ],
     loader: new Ext.tree.TreeLoader({
          applyLoader: false,
          uiProviders: {
               'layernodeui': LayerNodeUI
          }
     })
});

layerRoot.appendChild(forunspp);
layerRoot.appendChild(sessao2LayerNode);

With this code the parent node is filled with two layers but, however, both
of them are rendered with the checkbox only.
Is it possible to load the second and only the second layer with a radio
button?
Thanks in advance.

Kind regards,
Hugo


-- 
Hugo Martins
LabNT - ISEGI UNL
Campus de Campolide
1070-312 Lisboa
N 38°43'56.84", W 9°9'35.74"



-- 
Hugo Martins
LabNT - ISEGI UNL
Campus de Campolide
1070-312 Lisboa
N 38°43'56.84", W 9°9'35.74"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.geoext.org/pipermail/users/attachments/20110404/2e36e8a9/attachment.htm 


More information about the Users mailing list