<div>Well, I think I found a solution at least. Triggering events didn't work and nothing I tried with the node.attributes.radio methods listed in the IE Developer Tools debugger worked either. </div>
<div> </div>
<div>Dan Ramage, who put together the RCOOS site, tried something for me as well as that site has the same issue. While what he tried didn't quite work, it did give me an idea. Decided to add an arbitrary property when creating the overlay layers called "active". I set it to true for the layer I wanted to be active and the others I set to false. Then in the GeoExt RadioButtonPlugin.js code made this modification to the OnRenderNode function:</div>
<div> </div>
<div> onRenderNode: function(node) {<br> var a = node.attributes;<br> if(a.radioGroup && !a.radio) {<br> if(!node.layer.active) {<br> a.radio = Ext.DomHelper.insertBefore(node.ui.anchor,<br>
['<input type="radio" class="gx-tree-radio" name="',<br> a.radioGroup, '_radio"></input>'].join(""));<br> }<br>
else {<br> a.radio = Ext.DomHelper.insertBefore(node.ui.anchor,<br> ['<input type="radio" class="gx-tree-radio" name="',<br> a.radioGroup, '_radio" checked="true"></input>'].join(""));<br>
}<br> }<br> },</div>
<div> </div>
<div>(could change this in the TreeNodeRadioButton.js as it has the same function, but using RadioButtonPlugin at present)</div>
<div> </div>
<div>So, before the layer node is rendered, there's now a check for the active property:</div>
<div> </div>
<div>if(!node.layer.active)</div>
<div> </div>
<div>If active is not true, the radio button is configured as before. But if it is true, then add checked="true" to the Ext.DomHelper line to make the radio button the one that's clicked/checked when the page is loaded.</div>
<div> </div>
<div>Like I said, the solution works for both IE8 and Firefox 6.0.1 which is all I was able to test at present. Will still have to check Chrome and IE9.</div>
<div> </div>
<div>Thanks for anyone who looked into this but were scratching their heads as well. It's been puzzling me for days.</div>
<div> </div>
<div>Dave M</div>
<div> </div>
<div class="gmail_quote">On Wed, Aug 31, 2011 at 12:08 PM, David Miller <span dir="ltr"><<a href="mailto:teknocreator@gmail.com">teknocreator@gmail.com</a>></span> wrote:<br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">
<div>Good day folks! The app I'm working on has a tree with selectable optional overlays via check boxes plus an active layer radio button. When the app loads, I would like to specify one of the layers as active. I found in an earlier thread that if I put in this snippet before the end of the Ext.onReady():</div>
<div> </div>
<div>var node= tree.root.findChild('layer',wwalayer,true);</div>
<div>Ext.get(node.attributes.radio).set({</div>
<div> 'checked': true</div>
<div>});</div>
<div> </div>
<div>then the wwalayer radio button is "checked" when the page loads in Firefox so the user knows it is active. But, for some reason, this does not happen in IE8, though the layer is active. I know because a pop window appears on mouseover of the vector layer "Hazards"...won't do this if layer is not active. I'd like to have the same behavior in both browsers. I've tried examining the page via Developer Tools in IE8, but things don't seem to match up when I use Firebug in Firefox, i.e. there's node.attributes.radio in both but there's no 'checked' property displayed in the Developer Tools window when debugging in IE8. It's there in Firebug, though. I've tried looking through the list of properties but couldn't seem to find a property I could use for both.</div>
<div> </div>
<div>My test page:</div>
<div> </div>
<div><a href="http://www.mdl.nws.noaa.gov/wxmap/wxmapHourlyDay_test.php" target="_blank">http://www.mdl.nws.noaa.gov/wxmap/wxmapHourlyDay_test.php</a></div>
<div> </div>
<div>I have thought of maybe triggering the radiochange event and seeing if that would work. Just didn't get there yet and was perhaps hoping someone else may have run into this issue.</div>
<div> </div>
<div>Thanks for any help and I'll report if I solved this via triggering the event.</div>
<div> </div>
<div>Dave M</div>
<div> </div></blockquote></div><br>