<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"><<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 class="im">Paul james wrote:<br>> You are right, It works, but it dont turns on/off the childrenīs<br>> 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>><br>> Paul<br>><br>> On Wed, Oct 7, 2009 at 4:02 PM, Andreas Hocevar <<a href="mailto:ahocevar@opengeo.org">ahocevar@opengeo.org</a><br></div>
<div>
<div></div>
<div class="h5">> <mailto:<a href="mailto:ahocevar@opengeo.org">ahocevar@opengeo.org</a>>> wrote:<br>><br>> Hey-<br>><br>> where exactly did you set the checked attribute? Because this is<br>
> exactly<br>> how it should work.<br>><br>> Note though that a checkbox won't be connected to children's<br>> checkboxes<br>> in Ext.<br>><br>> Regards,<br>> Andreas.<br>
><br>> Paul james wrote:<br>> > Thanks Andreas!<br>> ><br>> > Jumping to the last question..<br>> > I have that tree configuration :<br>> ><br>> > {<br>
> > id: 'Transporte',<br>> > text:<br>> > 'Transporte',<br>> > children:<br>> > [<br>
> > {<br>> > id: 'Rodoviario',<br>> > text:<br>> > 'Rodoviario',<br>> > children:<br>
> > [<br>> > {<br>> > nodeType: "gx_layer",<br>> > id: "RodoviaFederal",<br>
> > layer: "Rodovia Federal",<br>> > isLeaf:<br>> > false,<br>> > loader: {<br>
> > param: "LAYERS",<br>> > ...<br>> ><br>> > The checkbox is only generated in last level ( RodoviaFederal and<br>> > sublayers) ... How can I generate checkbox for all levels? Using<br>
> > "checked" attribute, it appers, but doest work ... Any idea?<br>> ><br>> > Paul<br>> ><br>> > On Wed, Oct 7, 2009 at 4:09 AM, Andreas Hocevar<br>> <<a href="mailto:ahocevar@opengeo.org">ahocevar@opengeo.org</a> <mailto:<a href="mailto:ahocevar@opengeo.org">ahocevar@opengeo.org</a>><br>
</div></div>
<div class="im">> > <mailto:<a href="mailto:ahocevar@opengeo.org">ahocevar@opengeo.org</a> <mailto:<a href="mailto:ahocevar@opengeo.org">ahocevar@opengeo.org</a>>>> wrote:<br>> ><br>> > Paul james wrote:<br>
> > > About my other problem (Change sublayer label on treeview) ...<br>> > > I tried with that :<br>> > ><br>> > > tree.on('beforeappend', function(tree, parent, node){<br>
> > > node.text = "test";<br>> > > });<br>> > ><br>> > > It only changes the last child... Can you help me on that?<br>> ><br>> > I think so. Because the visual representation of the layer order<br>
> > is the<br>> > other way around as the layer stack, nodes are inserted<br>> rather than<br>> > appended. Try the following:<br>> ><br>> > function setText(tree, parent, node) {<br>
> > node.text = "test";<br>> > }<br>> > tree.on({<br>> > beforeappend: setText,<br>> > beforeinsert: setText<br>> > });<br>
> ><br>> > Regards,<br>> > Andreas.<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>> ><br>> ------------------------------------------------------------------------<br>> ><br>> > _______________________________________________<br>
> > Users mailing list<br></div>> > <a href="mailto:Users@geoext.org">Users@geoext.org</a> <mailto:<a href="mailto:Users@geoext.org">Users@geoext.org</a>><br>
<div class="im">> > <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>> 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><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>