[Users] RadioButtonMixin and custom TreeNodeUI

Dan Ramage dan at inlet.geol.sc.edu
Fri Jul 23 22:54:57 CEST 2010


Using the RadioButtonPlugin, I create a SliderPlugin which does put a slide
in the tree node, however I can't seem to catch the events. Test code can be
seen here: http://rcoos.org/carolinasrcoosrev2/geoext/examples/tree.html
I am not sure my approach is going to work, in the render function I
basically create a Ext.Slider object. The underlying slider code does
execute as I can drag the thumb track back and forth, just don't seem to
receive any events. I suspect the fact that I create the <div> to give to
the renderTo of the slider is where the issue lies, instead of the events
going to the tree perhaps they are just going to the document.

onRenderNode: function(node) { 
  var a = node.attributes; 
  if(a.slider) { 
    this.indentMarkup = node.parentNode ?
node.parentNode.ui.getChildIndent() : '';          
    var elID = node.id + '-tree-slider-';
    elID = Ext.id(null, elID);
    buf = [
    '<span class="x-tree-node-indent">', this.indentMarkup, 
    '<div id=', elID, '></div>',"</span>"                    
    ];

    a.slider = Ext.DomHelper.insertAfter(node.ui.anchor, 
    buf.join("")); 

    this.slider = new Ext.Slider({
    renderTo: elID,
    minValue: 0,
    maxValue: 100,
    bubbleEvents: ['change']
    });

  }
}



More information about the Users mailing list