<div>Andreas</div>
<div>I´m testing your patch...</div>
<div>But I think it isnt working well in a case...</div>
<div> </div>
<div> </div>
<div>I have that Openlayer Layer, the first layer ON and the next 2 OFF:</div>
<div>   new OpenLayers.Layer.MapServer(&quot;FederalRoads&quot;,<br>                _cgi, {<br>                    map: _mapfile,<br>                    &quot;LAYERS&quot;: [<br>                    &#39;Layer1ON&#39;,                   <br>
                    &#39;Layer2OFF&#39;,<br>                    &#39;Layer3OFF&#39;                  <br>                    ],<br>                    transparent: true,                    <br>                    format: &quot;image/png&quot;<br>
                }, {<br>                    isBaseLayer: false,<br>                    buffer: 0,                   <br>                    displayInLayerSwitcher: false,<br>                    visibility: true<br>                })<br>
</div>
<div> </div>
<div>The TreeView config :</div>
<div> text: &#39;Roads&#39;,<br>                            expanded : true, <br>                            checked: false,                                <br>                            children:<br>                            [<br>
                                {<br>                                    nodeType: &quot;gx_layerparam&quot;,                                  <br>                                    layer: &quot;FederalRoads&quot;,<br>                                    param: &quot;LAYERS&quot;,<br>
                                    item: &quot;Layer1ON&quot;,<br>                                    text: &quot;FederalRoads1&quot;,<br>                                    checked: true,                       <br>                                    uiProvider: ...<br>
                                },{<br>                                    nodeType: &quot;gx_layerparam&quot;,                                  <br>                                    layer: &quot;FederalRoads&quot;,<br>
                                    param: &quot;LAYERS&quot;,<br>                                    item: &quot;Layer2OFF&quot;,<br>                                    text: &quot;FederalRoads2&quot;,<br>                                    checked: false,                       <br>
                                    uiProvider: ...     <br>                                },{<br>                                    nodeType: &quot;gx_layerparam&quot;,                                  <br>                                    layer: &quot;FederalRoads&quot;,<br>
                                    param: &quot;LAYERS&quot;,<br>                                    item: &quot;Layer3OFF&quot;,<br>                                    text: &quot;FederalRoads3&quot;,<br>                                    checked: false,                       <br>
                                    uiProvider: ...     <br>                                }<br></div>
<div>Everthing starts OK... So I deselect Layer1ON and select the other 2 layers (Layer2 and Layer3)... Thats ok...</div>
<div>But, when I deselect the last layer in treeview(Layer3OFF), the other checkbutton (Layer2OFF) is <span style="WIDOWS: 2; TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: small arial, sans-serif; WHITE-SPACE: normal; ORPHANS: 2; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" class="Apple-style-span"><span style="BORDER-COLLAPSE: collapse; WHITE-SPACE: pre; FONT-SIZE: 17px; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px" class="Apple-style-span">automatically deselected... </span></span></div>

<div><span style="WIDOWS: 2; TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: small arial, sans-serif; WHITE-SPACE: normal; ORPHANS: 2; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" class="Apple-style-span"><span style="BORDER-COLLAPSE: collapse; WHITE-SPACE: pre; FONT-SIZE: 17px; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px" class="Apple-style-span"></span></span> </div>

<div><span style="WIDOWS: 2; TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: small arial, sans-serif; WHITE-SPACE: normal; ORPHANS: 2; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" class="Apple-style-span"><span style="BORDER-COLLAPSE: collapse; WHITE-SPACE: pre; FONT-SIZE: 17px; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px" class="Apple-style-span">Why ? Is that a bug?</span></span></div>

<div><span style="WIDOWS: 2; TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: small arial, sans-serif; WHITE-SPACE: normal; ORPHANS: 2; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" class="Apple-style-span"><span style="BORDER-COLLAPSE: collapse; WHITE-SPACE: pre; FONT-SIZE: 17px; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px" class="Apple-style-span"></span></span> </div>

<div><span style="WIDOWS: 2; TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: small arial, sans-serif; WHITE-SPACE: normal; ORPHANS: 2; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" class="Apple-style-span"><span style="BORDER-COLLAPSE: collapse; WHITE-SPACE: pre; FONT-SIZE: 17px; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px" class="Apple-style-span">Thanks</span></span></div>

<div><span style="WIDOWS: 2; TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: small arial, sans-serif; WHITE-SPACE: normal; ORPHANS: 2; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" class="Apple-style-span"><span style="BORDER-COLLAPSE: collapse; WHITE-SPACE: pre; FONT-SIZE: 17px; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px" class="Apple-style-span"></span></span> </div>

<div><span style="WIDOWS: 2; TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: small arial, sans-serif; WHITE-SPACE: normal; ORPHANS: 2; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" class="Apple-style-span"><span style="BORDER-COLLAPSE: collapse; WHITE-SPACE: pre; FONT-SIZE: 17px; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px" class="Apple-style-span"></span></span> </div>

<div><br> </div>
<div class="gmail_quote">On Mon, Oct 19, 2009 at 3:42 PM, Paul james <span dir="ltr">&lt;<a href="mailto:pauljame@gmail.com">pauljame@gmail.com</a>&gt;</span> wrote:<br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">
<div>Thats great Andreas...</div>
<div> </div>
<div>Thanks!</div>
<div> </div><font color="#888888">
<div>Paul<br><br></div></font>
<div>
<div></div>
<div class="h5">
<div class="gmail_quote">On Sun, Oct 18, 2009 at 8:28 AM, Andreas Hocevar <span dir="ltr">&lt;<a href="mailto:ahocevar@opengeo.org" target="_blank">ahocevar@opengeo.org</a>&gt;</span> wrote:<br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">
<div>Paul james wrote:<br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">Ohh no :(<br>Any other alternative to solve that?<br> ps.: Can you send that ticket url?<br></blockquote><br>
</div>I was thinking that you create a ticket. But hey, it&#39;s FOSS4G time and I&#39;m feeling generous, so here it is - even with patch and tests:<br><br><a href="http://trac.geoext.org/ticket/166" target="_blank">http://trac.geoext.org/ticket/166</a><br>
<br>Regards,<br>Andreas.<br><br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote"> Paul 
<div>
<div></div>
<div><br><br>On Wed, Oct 14, 2009 at 11:12 PM, Andreas Hocevar &lt;<a href="mailto:ahocevar@opengeo.org" target="_blank">ahocevar@opengeo.org</a> &lt;mailto:<a href="mailto:ahocevar@opengeo.org" target="_blank">ahocevar@opengeo.org</a>&gt;&gt; wrote:<br>
<br>   Andreas Hocevar wrote:<br><br>       Hi Paul,<br><br>       the recommendations given so far should all work, but let Papa<br>       Treenode speak from his experience:<br><br>       The best thing to do is override the createNode function of<br>
       the loader, as documented in<br>       <a href="http://www.extjs.com/deploy/dev/docs/?class=Ext.tree.TreeLoader" target="_blank">http://www.extjs.com/deploy/dev/docs/?class=Ext.tree.TreeLoader</a>.<br><br><br>   which, unfortunately, will *not* work because GeoExt sets the<br>
   visibility in the node&#39;s render method, regardless of its checked<br>   attribute. A tickdt with patch that fixes this would be in order I<br>   guess.<br><br>   Regards,<br>   Andreas.<br><br><br><br><br>       The createNode function is called with the attributes (attrs)<br>
       as argument, so you could check for attr.text and then set<br>       attr.checked accordingly.<br><br>       Regards,<br>       Andreas.<br><br>       Paul james wrote:<br><br>           Thanks Matt...<br>           I tried that:<br>
            nodeType: &quot;gx_layer&quot;,<br>                       id: &quot;Streets&quot;,<br>                       layer: &quot;Streets&quot;,<br>                       isLeaf: false,<br>                       expanded : true,                                                    loader: {<br>
                             param: &quot;LAYERS&quot;,                                                                     baseAttrs: {<br>                                     uiProvider:<br>           Ext.extend(Ext.tree.TreeNodeUI, {<br>
                                           render:<br>           function(bulkRender) {                                                     if(this.node.text == &quot;Layer3&quot;)                                                                                                                 this.node.layer.setVisibility(false);                                                                                     Ext.tree.TreeNodeUI.prototype.render.apply(this,<br>
           arguments);                                  }<br>           ...<br>             But all node´s layer are set off... How can I set the<br>           subnode´s visibility separately?<br>            Thanks<br>            Paul<br>
<br>           On Wed, Oct 14, 2009 at 11:50 AM, Matt Priour<br>           &lt;<a href="mailto:mpriour@kestrelcomputer.com" target="_blank">mpriour@kestrelcomputer.com</a><br>           &lt;mailto:<a href="mailto:mpriour@kestrelcomputer.com" target="_blank">mpriour@kestrelcomputer.com</a>&gt;<br>
</div></div>           &lt;mailto:<a href="mailto:mpriour@kestrelcomputer.com" target="_blank">mpriour@kestrelcomputer.com</a> 
<div><br>           &lt;mailto:<a href="mailto:mpriour@kestrelcomputer.com" target="_blank">mpriour@kestrelcomputer.com</a>&gt;&gt;&gt; wrote:<br><br>              Handle the &#39;render&#39; event of the layer tree and<br>
           programmatically<br>              uncheck the nodes that you don&#39;t want on.<br>              The only disadvantage of this method is that depending<br>           on timing the<br>              application may or may not attempt to do GetMap<br>
           requests on the<br>              layers you don&#39;t want. Though they still would not be<br>           visible, if<br>              you are calling a slow service or complex rendering is<br>           involved,<br>
              then the GetMap requests can block other WMS service<br>           requests.<br>              Matt Priour<br>              Kestrel Computer Consullting<br>              *From:* Paul james &lt;mailto:<a href="mailto:pauljame@gmail.com" target="_blank">pauljame@gmail.com</a><br>
           &lt;mailto:<a href="mailto:pauljame@gmail.com" target="_blank">pauljame@gmail.com</a>&gt;&gt;<br>              *Sent:* Wednesday, October 14, 2009 9:39 AM<br>              *To:* <a href="mailto:bartvde@osgis.nl" target="_blank">bartvde@osgis.nl</a> &lt;mailto:<a href="mailto:bartvde@osgis.nl" target="_blank">bartvde@osgis.nl</a>&gt;<br>
</div>           &lt;mailto:<a href="mailto:bartvde@osgis.nl" target="_blank">bartvde@osgis.nl</a> &lt;mailto:<a href="mailto:bartvde@osgis.nl" target="_blank">bartvde@osgis.nl</a>&gt;&gt; 
<div><br>              *Cc:* <a href="mailto:users@geoext.org" target="_blank">users@geoext.org</a> &lt;mailto:<a href="mailto:users@geoext.org" target="_blank">users@geoext.org</a>&gt;<br></div>           &lt;mailto:<a href="mailto:users@geoext.org" target="_blank">users@geoext.org</a> &lt;mailto:<a href="mailto:users@geoext.org" target="_blank">users@geoext.org</a>&gt;&gt; ;<br>
           Andreas Hocevar<br>              &lt;mailto:<a href="mailto:ahocevar@opengeo.org" target="_blank">ahocevar@opengeo.org</a> &lt;mailto:<a href="mailto:ahocevar@opengeo.org" target="_blank">ahocevar@opengeo.org</a>&gt;&gt; 
<div><br>              *Subject:* Re: [Users] Set visibility on Sub-layers<br><br>              Thanks bart...<br>              But I need set all layers to build up my treeview, like<br>           that:<br>                   nodeType: &quot;gx_layer&quot;,<br>
                                  layer: &quot;Streets&quot;,<br>                                  isLeaf: false,<br>                                                 loader: {<br>                                      param: &quot;LAYERS&quot;,<br>
              ...<br>                                 On Wed, Oct 14, 2009 at 11:16 AM,<br>           &lt;<a href="mailto:bartvde@osgis.nl" target="_blank">bartvde@osgis.nl</a> &lt;mailto:<a href="mailto:bartvde@osgis.nl" target="_blank">bartvde@osgis.nl</a>&gt;<br>
</div>
<div>
<div></div>
<div>              &lt;mailto:<a href="mailto:bartvde@osgis.nl" target="_blank">bartvde@osgis.nl</a> &lt;mailto:<a href="mailto:bartvde@osgis.nl" target="_blank">bartvde@osgis.nl</a>&gt;&gt;&gt; wrote:<br><br>                  Hi Paul,<br>
<br>                  only by using LAYERS: [&#39;layer1&#39;, &#39;layer2&#39;].<br><br>                  Then later on, when you need more layers, you<br>           should change the<br>                  LAYERS<br>                  param using the mergeNewParams function.<br>
<br>                  Best regards,<br>                  Bart<br><br>                   &gt; Hello guys... I have that set of sublayers :<br>                   &gt;<br>                   &gt; new OpenLayers.Layer.MapServer(&quot;Streets&quot;,<br>
                   &gt;                 _cgi, {<br>                   &gt;                     map: _mapfile,<br>                   &gt;                     &quot;LAYERS&quot;:<br>                  [&#39;Layer1&#39;,&#39;Layer2&#39;,&#39;Layer3&#39;,&#39;Layer4&#39;,<br>
                   &gt; &#39;Layer5&#39;],<br>                   &gt;                     transparent: true,<br>                   &gt;                     format: &quot;image/png&quot;<br>                   &gt;                 }, {<br>
                   &gt;                     isBaseLayer: false,<br>                   &gt;                     buffer: 0,<br>                   &gt;                     displayInLayerSwitcher: false,<br>                   &gt;                     visibility: false<br>
                   &gt;                 })<br>                   &gt;<br>                   &gt; I悲 like to start with Layer1 and Layer2 with<br>           visibility true<br>                  ... How can<br>                   &gt; I<br>
                   &gt; do that?<br>                   &gt;<br>                   &gt; Paul<br>                   &gt; _______________________________________________<br>                   &gt; Users mailing list<br>                   &gt; <a href="mailto:Users@geoext.org" target="_blank">Users@geoext.org</a> &lt;mailto:<a href="mailto:Users@geoext.org" target="_blank">Users@geoext.org</a>&gt;<br>
</div></div>           &lt;mailto:<a href="mailto:Users@geoext.org" target="_blank">Users@geoext.org</a> &lt;mailto:<a href="mailto:Users@geoext.org" target="_blank">Users@geoext.org</a>&gt;&gt; 
<div><br>                   &gt; <a href="http://www.geoext.org/cgi-bin/mailman/listinfo/users" target="_blank">http://www.geoext.org/cgi-bin/mailman/listinfo/users</a><br>                   &gt;<br><br><br><br>                        ------------------------------------------------------------------------<br>
<br>              _______________________________________________<br>              Users mailing list<br>              <a href="mailto:Users@geoext.org" target="_blank">Users@geoext.org</a> &lt;mailto:<a href="mailto:Users@geoext.org" target="_blank">Users@geoext.org</a>&gt;<br>
</div>           &lt;mailto:<a href="mailto:Users@geoext.org" target="_blank">Users@geoext.org</a> &lt;mailto:<a href="mailto:Users@geoext.org" target="_blank">Users@geoext.org</a>&gt;&gt; 
<div><br>              <a href="http://www.geoext.org/cgi-bin/mailman/listinfo/users" target="_blank">http://www.geoext.org/cgi-bin/mailman/listinfo/users</a><br><br><br><br><br><br><br>   --    Andreas Hocevar<br>   OpenGeo - <a href="http://opengeo.org/" target="_blank">http://opengeo.org/</a><br>
   Expert service straight from the developers.<br><br><br></div>------------------------------------------------------------------------ 
<div><br><br>_______________________________________________<br>Users mailing list<br><a href="mailto:Users@geoext.org" target="_blank">Users@geoext.org</a><br></div>
<div><a href="http://www.geoext.org/cgi-bin/mailman/listinfo/users" target="_blank">http://www.geoext.org/cgi-bin/mailman/listinfo/users</a><br> <br></div></blockquote>
<div>
<div></div>
<div><br><br>-- <br>Andreas Hocevar<br>OpenGeo - <a href="http://opengeo.org/" target="_blank">http://opengeo.org/</a><br>Expert service straight from the developers.<br><br></div></div></blockquote></div><br></div></div>
</blockquote></div><br>