<div>Thanks for the help Andreas ! </div>
<div> </div>
<div>Paul<br><br></div>
<div class="gmail_quote">On Thu, Oct 8, 2009 at 5:45 AM, Andreas Hocevar <span dir="ltr">&lt;<a href="mailto:ahocevar@opengeo.org">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 class="im">Paul james wrote:<br>&gt; You are right, It works, but it dont turns on/off the childrenīs<br>&gt; checkboxes... Is that a way to do that? Itīs kind useless that way...<br><br></div>Sure there is a way. Just add a checkchange handler to the container<br>
node and set its childNodes to the same checked attribute value. More<br>details can be found in the Ext JS documentation of Ext.tree.*<br>(<a href="http://www.extjs.com/deploy/dev/docs/" target="_blank">http://www.extjs.com/deploy/dev/docs/</a>).<br>
<br>Regards,<br>Andreas.<br>
<div class="im"><br>&gt;<br>&gt; Paul<br>&gt;<br>&gt; On Wed, Oct 7, 2009 at 4:02 PM, Andreas Hocevar &lt;<a href="mailto:ahocevar@opengeo.org">ahocevar@opengeo.org</a><br></div>
<div>
<div></div>
<div class="h5">&gt; &lt;mailto:<a href="mailto:ahocevar@opengeo.org">ahocevar@opengeo.org</a>&gt;&gt; wrote:<br>&gt;<br>&gt;     Hey-<br>&gt;<br>&gt;     where exactly did you set the checked attribute? Because this is<br>
&gt;     exactly<br>&gt;     how it should work.<br>&gt;<br>&gt;     Note though that a checkbox won&#39;t be connected to children&#39;s<br>&gt;     checkboxes<br>&gt;     in Ext.<br>&gt;<br>&gt;     Regards,<br>&gt;     Andreas.<br>
&gt;<br>&gt;     Paul james wrote:<br>&gt;     &gt; Thanks Andreas!<br>&gt;     &gt;<br>&gt;     &gt; Jumping to the last question..<br>&gt;     &gt; I have that tree configuration :<br>&gt;     &gt;<br>&gt;     &gt; {<br>
&gt;     &gt;                     id: &#39;Transporte&#39;,<br>&gt;     &gt;                     text:<br>&gt;     &gt; &#39;Transporte&#39;,<br>&gt;     &gt;                     children:<br>&gt;     &gt;                     [<br>
&gt;     &gt;                         {<br>&gt;     &gt;                             id: &#39;Rodoviario&#39;,<br>&gt;     &gt;                             text:<br>&gt;     &gt; &#39;Rodoviario&#39;,<br>&gt;     &gt;                             children:<br>
&gt;     &gt;                             [<br>&gt;     &gt;                                 {<br>&gt;     &gt;                                     nodeType: &quot;gx_layer&quot;,<br>&gt;     &gt;                                     id: &quot;RodoviaFederal&quot;,<br>
&gt;     &gt;                                     layer: &quot;Rodovia Federal&quot;,<br>&gt;     &gt;                                     isLeaf:<br>&gt;     &gt; false,<br>&gt;     &gt;                                     loader: {<br>
&gt;     &gt;                                         param: &quot;LAYERS&quot;,<br>&gt;     &gt; ...<br>&gt;     &gt;<br>&gt;     &gt; The checkbox is only generated in last level ( RodoviaFederal and<br>&gt;     &gt; sublayers) ... How can I generate checkbox for all levels? Using<br>
&gt;     &gt; &quot;checked&quot; attribute, it appers, but doest work ... Any idea?<br>&gt;     &gt;<br>&gt;     &gt; Paul<br>&gt;     &gt;<br>&gt;     &gt; On Wed, Oct 7, 2009 at 4:09 AM, Andreas Hocevar<br>&gt;     &lt;<a href="mailto:ahocevar@opengeo.org">ahocevar@opengeo.org</a> &lt;mailto:<a href="mailto:ahocevar@opengeo.org">ahocevar@opengeo.org</a>&gt;<br>
</div></div>
<div class="im">&gt;     &gt; &lt;mailto:<a href="mailto:ahocevar@opengeo.org">ahocevar@opengeo.org</a> &lt;mailto:<a href="mailto:ahocevar@opengeo.org">ahocevar@opengeo.org</a>&gt;&gt;&gt; wrote:<br>&gt;     &gt;<br>&gt;     &gt;     Paul james wrote:<br>
&gt;     &gt;     &gt; About my other problem (Change sublayer label on treeview) ...<br>&gt;     &gt;     &gt; I tried with that :<br>&gt;     &gt;     &gt;<br>&gt;     &gt;     &gt; tree.on(&#39;beforeappend&#39;, function(tree, parent, node){<br>
&gt;     &gt;     &gt;   node.text = &quot;test&quot;;<br>&gt;     &gt;     &gt;  });<br>&gt;     &gt;     &gt;<br>&gt;     &gt;     &gt; It only changes the last child... Can you help me on that?<br>&gt;     &gt;<br>&gt;     &gt;     I think so. Because the visual representation of the layer order<br>
&gt;     &gt;     is the<br>&gt;     &gt;     other way around as the layer stack, nodes are inserted<br>&gt;     rather than<br>&gt;     &gt;     appended. Try the following:<br>&gt;     &gt;<br>&gt;     &gt;     function setText(tree, parent, node) {<br>
&gt;     &gt;        node.text = &quot;test&quot;;<br>&gt;     &gt;     }<br>&gt;     &gt;     tree.on({<br>&gt;     &gt;        beforeappend: setText,<br>&gt;     &gt;        beforeinsert: setText<br>&gt;     &gt;     });<br>
&gt;     &gt;<br>&gt;     &gt;     Regards,<br>&gt;     &gt;     Andreas.<br>&gt;     &gt;<br>&gt;     &gt;     --<br>&gt;     &gt;     Andreas Hocevar<br>&gt;     &gt;     OpenGeo - <a href="http://opengeo.org/" target="_blank">http://opengeo.org/</a><br>
&gt;     &gt;     Expert service straight from the developers.<br>&gt;     &gt;<br>&gt;     &gt;<br>&gt;     &gt;<br>&gt;     ------------------------------------------------------------------------<br>&gt;     &gt;<br>&gt;     &gt; _______________________________________________<br>
&gt;     &gt; Users mailing list<br></div>&gt;     &gt; <a href="mailto:Users@geoext.org">Users@geoext.org</a> &lt;mailto:<a href="mailto:Users@geoext.org">Users@geoext.org</a>&gt;<br>
<div class="im">&gt;     &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;     &gt;<br>&gt;<br>&gt;<br>&gt;     --<br>&gt;     Andreas Hocevar<br>
&gt;     OpenGeo - <a href="http://opengeo.org/" target="_blank">http://opengeo.org/</a><br>&gt;     Expert service straight from the developers.<br>&gt;<br>&gt;<br><br><br></div>--<br>
<div>
<div></div>
<div class="h5">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>