[Users] Radio Button in Sub-nodes (Treeview)...

Andreas Hocevar ahocevar at opengeo.org
Thu Oct 22 03:10:20 CEST 2009


Hey Paul,

the LayerNodeUI already provides a built-in radio button -- just 
configure it with a radio attribute. The value is a string (name of the 
radio group).

LayerParamNodes use a plain Ext.Tree.TreeNodeUI. You should be able to 
extend it in a way like you did in your example below for the TreeNode.

Regards,
Andreas.
Paul james wrote:
> Hello ...
> I´m able to add a radiobutton on sublayers that use nodetype="gx_layer"...
> Example:
>                                     nodeType: 
> "gx_layer",                                 
>                                     layer: "layer1",
>                                     isLeaf: false,                        
>                                     loader: {
>                                         param: 
> "LAYERS",                                      
>                                         baseAttrs: {
>                                             uiProvider: 
> Ext.extend(Ext.tree.TreeNodeUI, {
>                                                 render: 
> function(bulkRender) {                           
>                                                     
> Ext.tree.TreeNodeUI.prototype.render.apply(this, 
> arguments);                                                  
>                                                     var cb = 
> this.checkbox;                          
>                                                     
> Ext.DomHelper.insertAfter(cb, ' <input type="radio" 
> class="gx-tree-radio" name="radio"></input>' );
>                                                 },
>                                                 onClick: function(e) {
>                                                     
> if(e.getTarget('.gx-tree-radio', 1)) 
> {                                    
>                                                         
> alert(this.node.text);
>                                                     }
>                                                     else {
>                                                         
> Ext.tree.TreeNodeUI.prototype.onClick.apply(this,arguments);
>                                                     }
>                                                 }
>                                             })
>                                         }
>  
> But, and  how about nodeType: "gx_layerparam" ? How can I add a radio 
> button to that node?
>  
>                                 nodeType: "gx_layerparam",
>                                 layer: "Layer1",
>                                 param: "LAYERS",
>                                 item: "Layer12",
>                                 text: "Test"
>  
> I tried to implement the loader, but it doest work... 
>  
> Pail
>
>  
> ------------------------------------------------------------------------
>
> _______________________________________________
> 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