<div>Thanks...</div>
<div>It´s working now...</div>
<div>I added that code in contructor </div>
<div> ...</div>
<div> for (i=0;i< mapPanel.layers.map.layers.length;i++)<br> {<br> if(mapPanel.layers.map.layers[i].name == config.layer)<br> {<br> this.allItems = mapPanel.layers.map.layers[i].params.LAYERS;<br>
break;<br> }<br> }</div>
<div>...<br></div>
<div>And removed <br>this.allItems = this.getItems() </div>
<div>from render method...</div>
<div> </div>
<div>Paul<br></div>
<div class="gmail_quote">On Thu, Dec 10, 2009 at 4:14 PM, Andreas Hocevar <span dir="ltr"><<a href="mailto:ahocevar@opengeo.org">ahocevar@opengeo.org</a>></span> wrote:<br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">
<div bgcolor="#ffffff" text="#000000">
<div class="im">On 2009-12-10 19:11, Paul james wrote:
<blockquote type="cite">
<div>Thanks Andreas...<br></div>
<div>But I dint get that...</div>
<div class="gmail_quote">I´m trying figure out how that allItems array and method onCheckChange should work, without success..</div>
<div class="gmail_quote">That bug occurs always that I have a sublayer with checked true and two or more sublayers with checked false...</div>
<div class="gmail_quote"> </div>
<div class="gmail_quote">Please please help me :(</div></blockquote><br></div>There are two solutions I can think of:<br><br>* provide allItems in the configuration instead of using getItems() in the render method (in LayerParamNode.js).<br>
<br>* determine allItems before the node is rendered. Either in the node constructor (if layer provided as object) or in a listener for the layerStore's update event.<br><br>The latter is obviously more elegant, but more effort to implement.<br>
<br>Regards,<br><font color="#888888">Andreas.</font>
<div class="im"><br>
<blockquote type="cite">
<div class="gmail_quote"> </div>
<div class="gmail_quote">Paul</div>
<div class="gmail_quote"> </div>
<div class="gmail_quote"> </div>
<div class="gmail_quote">On Wed, Dec 9, 2009 at 6:08 AM, Andreas Hocevar <span dir="ltr"><<a href="mailto:ahocevar@opengeo.org" target="_blank">ahocevar@opengeo.org</a>></span> wrote:<br>
<blockquote style="BORDER-LEFT: rgb(204,204,204) 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">Hi,<br><br>I guess the problem is that allItems will be set incorrectly for some<br>layers. My patch calls onCheckChange when it finds a checked attribute<br>
on the layer node. If this is set to false, it will turn off the layer,<br>removing the layer from the params. Layers that get created after that<br>will miss that layer in their allItems array.<br><br>I don't have time to look for a solution now, but maybe the information<br>
above is enough for you to figure out one.<br>
<div><br>Regards,<br>Andreas.<br><br></div></blockquote></div></blockquote><br><br></div>
<div class="im"><pre cols="72">--
Andreas Hocevar
OpenGeo - <a href="http://opengeo.org/" target="_blank">http://opengeo.org/</a>
Expert service straight from the developers.
</pre></div></div></blockquote></div><br>