[Users] How to uncheck radionode when layer visibility is also false?
Robert Buckley
robertdbuckley at yahoo.com
Wed Mar 28 11:32:48 CEST 2012
Hi,
I am using geoext 1.1 to display radio nodes in a tree. I would like to force the radio-node-checkbox to "false" when the layer visibility is also set to "false".
Below is the code out of my treepanel.
As you can see, the tree-node-radio-button sets the active layer, and at the same time changes the layer visibility to "true" . I now want to change the radionode to checked="false" when the layer visibility is "false" ( because we can´t use the wmsgetfeatureinfo on a node which isn´t visibile!)
??????HELP?????? marks the spot!
plugins: [
new GeoExt.plugins.TreeNodeRadioButton({
listeners: { // listener for the radiotreenode
"radiochange": function(node) {
//alert(node.text + " is now the active layer.");
activeNode = node;
if(activeNode == node)
{activeNode.select.defer(100, node);
featureInfo.activate();
selLayer = node.layer;
alert(node.text + "radio node");
featureInfo.layers = [selLayer];
node.layer.setVisibility(true); // changes the layer visibility to "true"
}
else
{
featureInfo.deactivate();
}
}
}
})
],
...
...other code...
listeners: { // listener for the treenode
'checkchange': function(node, checked) {
if (checked === false) {
// set the radionode button to checked="false" ??????HELP??????
}
},
If anyone can see how I reference the node from here I would be most grateful,
yours,
Rob
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.geoext.org/pipermail/users/attachments/20120328/a8afe644/attachment.htm
More information about the Users
mailing list