In addition to the radioGroup, you also need to set the uiProvider on the gx_layer node.
Andreas. On Wed, Jul 25, 2012 at 2:07 PM, Jacinto Estima <jacinto.est...@gmail.com> wrote: > Thanks for your answer Andreas. > > I tried your suggestion but didn't work. Maybe I am doing something wrong. > Here is my code case you can take a look and see if everything is ok (its > working for the gx_overlaylayercontainer but not for the gx_layer). > > var LayerNodeUI = Ext.extend( > GeoExt.tree.LayerNodeUI, new GeoExt.tree.RadioButtonMixin() > ); > > var treeConfig = ([{ > nodeType: "gx_baselayercontainer" > }, { > nodeType: "gx_overlaylayercontainer", > loader: { > baseAttrs: { > radioGroup: "foo", > uiProvider: "use_radio" > } > } > }, { > text: "maps", > leaf: false, > children: [{ > text: "2010", > leaf: false, > children: [{nodeType: "gx_layer", text: "test1", > layer: a2010, radioGroup: "myRadioID"}, > {nodeType: "gx_layer", text: " > test2", layer: b2010, radioGroup: "myRadioID"}, > {nodeType: "gx_layer", text: " > test3", layer: c2010, radioGroup: "myRadioID"}] > }] > }]); > > var LayerTree = new Ext.tree.TreePanel({ > title: 'Layers', > renderTo: 'layers', > rootVisible: false, > loader: new Ext.tree.TreeLoader({ > applyLoader: false, > uiProviders: { > "use_radio": LayerNodeUI > } > }), > root: { > nodeType: "async", > children: treeConfig > } > }); > > Appreciate your help. > Regards. > > -----Original Message----- > From: andreas.hoce...@gmail.com [mailto:andreas.hoce...@gmail.com] On Behalf > Of Andreas Hocevar > Sent: Wednesday, July 25, 2012 3:41 PM > To: Jacinto Estima > Cc: users@geoext.org > Subject: Re: [Users] Layer Nodes with Additional Radio Buttons > > Hi, > > if you want to have a radio button on a gx_layer node, configure it with a > radioGroup directly (instead of doing it in baseAttrs). > > Andreas. > > On Wed, Jul 25, 2012 at 1:30 PM, Jacinto Estima <jacinto.est...@gmail.com> > wrote: >> Hi all, >> >> >> >> To show layer nodes with additional radio buttons, I used the same >> idea shared in this example: >> http://dev.geoext.org/geoext/sandbox/ahocevar/playground/geoext/exampl >> es/tree.html >> >> >> >> If I use this code in a "gx_overlaylayercontainer" node type it works >> fine, but when I try to use in a "gx_layer" doesn't works. >> >> I was wondering if the additional radio buttons only works with >> "gx_overlaylayercontainer" or if I need to code something in a >> different way to get it to working with "gx_layer"? >> >> >> >> Appreciate your help. >> >> >> >> Thanks. >> >> >> >> >> _______________________________________________ >> Users mailing list >> Users@geoext.org >> http://www.geoext.org/cgi-bin/mailman/listinfo/users >> > > > > -- > Andreas Hocevar > OpenGeo - http://opengeo.org/ > Expert service straight from the developers. > -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. _______________________________________________ Users mailing list Users@geoext.org http://www.geoext.org/cgi-bin/mailman/listinfo/users