[Users] Find name of the checked node:SOLVED

Robert Buckley robertdbuckley at yahoo.com
Tue Mar 13 11:28:05 CET 2012


Instead I just programmatically selected the node which is checked 

activeNode.select.defer(100, node);

and used...
 var tree = Ext.getCmp("treePanel"); 
 var selectedNode = tree.getSelectionModel().getSelectedNode();

..to read the name of the selected node.

If anyone knows how to miss out the second step and directly find the checked node, I´d be curious as to how it works.

yours,

Rob


________________________________
 Von: Robert Buckley <robertdbuckley at yahoo.com>
An: "users at geoext.org" <users at geoext.org> 
Gesendet: 10:51 Dienstag, 13.März 2012
Betreff: [Users] Find name of the checked node
 

Hi,

I am stuck trying to modify my WMSgetFeatureinfo popup.
I´m using the treenode radio plugin to construct a layer tree. When the node is checked the attributes are read into the popup, but the title is feature.id. Instead I would like to have the layer name as the title so I have to iterate through the tree and find the node which is currently checked...

my feeble attempt doesn´t work...

//Loop through each Group of Layers
for (var i=0; i<=(layerRoot.childNodes.length -1); i++)
{
//Check for base layer, if so do this differently
if (layerRoot.childNodes[i].checked == true)
{alert("test");
}
 }

can anyone offer a solution?

cheers,

Rob
_______________________________________________
Users mailing list
Users at geoext.org
http://www.geoext.org/cgi-bin/mailman/listinfo/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.geoext.org/pipermail/users/attachments/20120313/1698ea2b/attachment-0001.htm 


More information about the Users mailing list