-
6 May 2012 6:45 AM #1
Help me create a Radio Tree Panel for ExtJs 4
Help me create a Radio Tree Panel for ExtJs 4
In ExtJs 3, I could create a Radio Tree Panel instead of a Checkbox in a Tree Panel, by extending the Ext.tree.TreeNodeUI then overriding the rendering by using an radio input type instead.
But in ExtJs 4, Ext.tree.TreeNodeUI no longer exist. I am suspecting that the code I should override is the Ext.tree.View, but by looking at its source code, I dont see anything that creates a checkbox or something like it. Maybe I am missing it or probably, I should be looking somewhere else. Which is why I posted this question here.Code:Ext.extend(Ext.ux.tree.RadioNode, Ext.tree.TreeNodeUI, { render : function(bulkRender){ ... ... } }
I will highly appreciate if someone could point me into the right direction. Thank you very much in advance.
-
7 May 2012 12:03 AM #2
Just some thoughts, looked in tree.View code, and I think you could try to extend the view and override the methods and cfgs which are related to the checkbox, or create a plugin wich will do the same :
1. the css class (checkboxSelector), probably only to change checkbox imgs to radio
2. Change to a radio behavior in the methods: onCheckboxChange, onCheckChange, getChecked.
3. Take care that a root node will have only one child(NodeInterface) with checked set to true.My blog: http://vadimpopa.com
-
21 May 2013 5:17 AM #3
Hey,
Just wondering if you got this working as I have a requirement to do the same?
Thanks


Reply With Quote