<div>Thats right !</div>
<div> </div>
<div>About my other problem (Change sublayer label on treeview) ...</div>
<div>I tried with that :</div>
<div> </div>
<div>tree.on(&#39;beforeappend&#39;, function(tree, parent, node){ </div>
<div>  node.text = &quot;test&quot;;</div>
<div> });</div>
<div> </div>
<div>It only changes the last child... Can you help me on that?</div>
<div> </div>
<div>Thanks...</div>
<div> </div>
<div>Paul</div>
<div><br><br> </div>
<div class="gmail_quote">On Fri, Oct 2, 2009 at 4:58 PM, 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">Hey-<br><br>one note on Format.JSON::write: I only used this in the tree.js example<br>to provide a means of changing the tree configuration via the user<br>
interface. This is nothing that you would do in a real-life application.<br><br>Lazy loading of JSON configurations from a remote server is a different<br>story, and Ext helps us a lot with it. nodeTypes are for loading<br>
different nodes, and for customized UIs, you can provide a list of<br>uiProviders with the tree&#39;s default loader.<br>
<div class="im"><br>Regards,<br>Andreas.<br><br>Paul james wrote:<br></div>
<div class="im">&gt; Update...<br>&gt; The problem was the Format.JSON().write function... It was not<br>&gt; rendering the baseAttrs method...<br>&gt; I put that inside<br>&gt; Â  Â  Â  root: {<br>&gt; Â  Â  Â  Â  Â  Â  nodeType: &quot;async&quot;,<br>
&gt; Â  Â  Â  Â  Â  Â  children:<br>&gt; ...<br>&gt;<br>&gt; And worked fine...<br>&gt;<br>&gt; Thanks Andreas for the great help!<br>&gt;<br>&gt; Paul<br>&gt;<br>&gt; On Thu, Oct 1, 2009 at 2:26 PM, Paul james &lt;<a href="mailto:pauljame@gmail.com">pauljame@gmail.com</a><br>
</div>
<div class="im">&gt; &lt;mailto:<a href="mailto:pauljame@gmail.com">pauljame@gmail.com</a>&gt;&gt; wrote:<br>&gt;<br>&gt; Â  Â  Thanks again Andreas...<br>&gt; Â  Â  I tried that code (just added cb variable)...<br>&gt; Â  Â  But the radio button never shows up... No javascript error<br>
&gt; Â  Â  reported as well... I think it is not entering in render function ...<br>&gt; Â  Â  Any idea?<br>&gt;<br>&gt; Â  Â  Â loader: {<br>&gt; Â  Â  Â  Â  Â  Â  Â  Â  param: &quot;LAYERS&quot;,<br>&gt; Â  Â  Â  Â  Â  Â  Â  Â  baseAttrs: {<br>
&gt; Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  uiProvider: Ext.extend(Ext.tree.TreeNodeUI, {<br>&gt; Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  render: function(bulkRender) {<br>&gt; Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  var cb = this.checkbox; //added<br>&gt;<br>&gt;<br>
&gt; Â  Â  Ext.tree.TreeNodeUI.prototype.render.apply(this, arguments);<br>&gt; Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Ext.DomHelper.insertAfter(cb, &#39;&lt;input<br>&gt; Â  Â  type=&quot;radio&quot; class=&quot;gx-tree-radio&quot; name=&quot;radio&quot;&gt;&lt;/input&gt;&#39; );<br>
&gt; Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  },<br>&gt; Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  onClick: function(e) {<br>&gt; Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  if(e.getTarget(&#39;.gx-tree-radio&#39;, 1)) {<br>&gt; Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  // do whatever you want to do when<br>
&gt; Â  Â  radio button was clicked<br>&gt; Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  }<br>&gt; Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  else {<br>&gt;<br>&gt; Â  Â  Ext.tree.TreeNodeUI.prototype.onClick.apply(this,arguments);<br>&gt; Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  }<br>
&gt; Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  }<br>&gt; Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  })<br>&gt; Â  Â  Â  Â  Â  Â  Â  Â  }<br>&gt; Â  Â  Â  Â  Â  Â  }<br>&gt;<br>&gt; Â  Â  Paul<br>&gt;<br>&gt; Â  Â  On Thu, Oct 1, 2009 at 5:35 AM, Andreas Hocevar<br></div>
<div>
<div></div>
<div class="h5">&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;&gt; wrote:<br>&gt;<br>&gt; Â  Â  Â  Â  Hey Paul,<br>&gt;<br>
&gt; Â  Â  Â  Â  in the simplest case, it would look something like this:<br>&gt;<br>&gt; Â  Â  Â  Â  nodeType: &quot;gx_layer&quot;,<br>&gt; Â  Â  Â  Â  layer: &quot;Tasmania (Group Layer)&quot;,<br>&gt; Â  Â  Â  Â  isLeaf: false,<br>&gt; Â  Â  Â  Â  loader: {<br>
&gt; Â  Â  Â  Â  Â  Â param: &quot;LAYERS&quot;,<br>&gt; Â  Â  Â  Â  Â  Â baseAttrs: {<br>&gt; Â  Â  Â  Â  Â  Â  Â  Â uiProvider: Ext.extend(Ext.tree.TreeNodeUI, {<br>&gt; Â  Â  Â  Â  Â  Â  Â  Â  Â  Â render: function(bulkRender) {<br>&gt;<br>&gt; Â  Â  Â  Â  Â Ext.tree.TreeNodeUI.prototype.render.apply(this, arguments);<br>
&gt; Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â Ext.DomHelper.insertAfter(cb,<br>&gt; Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â &#39;&lt;input type=&quot;radio&quot; class=&quot;gx-tree-radio&quot;<br>&gt; Â  Â  Â  Â  name=&quot;radio&quot;&gt;&lt;/input&gt;&#39;<br>
&gt; Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â );<br>&gt; Â  Â  Â  Â  Â  Â  Â  Â  Â  Â },<br>&gt; Â  Â  Â  Â  Â  Â  Â  Â  Â  Â onClick: function(e) {<br>&gt; Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â if(e.getTarget(&#39;.gx-tree-radio&#39;, 1)) {<br>&gt; Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â // do whatever you want to do when radio<br>
&gt; Â  Â  Â  Â  button was<br>&gt; Â  Â  Â  Â  clicked<br>&gt; Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â } else {<br>&gt;<br>&gt; Â  Â  Â  Â  Ext.tree.TreeNodeUI.prototype.onClick.apply(this,<br>&gt; Â  Â  Â  Â  arguments);<br>&gt; Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â }<br>
&gt; Â  Â  Â  Â  Â  Â  Â  Â  Â  Â }<br>&gt; Â  Â  Â  Â  Â  Â  Â  Â })<br>&gt; Â  Â  Â  Â  Â  Â }<br>&gt; Â  Â  Â  Â  }<br>&gt;<br>&gt; Â  Â  Â  Â  Regards,<br>&gt; Â  Â  Â  Â  Andreas.<br>&gt;<br>&gt; Â  Â  Â  Â  Paul james wrote:<br>&gt; Â  Â  Â  Â  &gt; I was talking about that with Andreas :<br>
&gt; Â  Â  Â  Â  &gt;<br>&gt; Â  Â  Â  Â  &gt; &gt; What I tried to do :<br>&gt; Â  Â  Â  Â  &gt; &gt; 1-) Add radio button to Group Layer ...<br>&gt; Â  Â  Â  Â  &gt; &gt; nodeType: &quot;gx_layer&quot;,<br>&gt; Â  Â  Â  Â  &gt; &gt; Â  Â  Â  Â  layer: &quot;Tasmania (Group Layer)&quot;,<br>
&gt; Â  Â  Â  Â  &gt; &gt; Â  Â  Â  Â  isLeaf: false,<br>&gt; Â  Â  Â  Â  &gt; &gt; Â  Â  Â  Â  loader: {<br>&gt; Â  Â  Â  Â  &gt; &gt; Â  Â  Â  Â  Â  Â  param: &quot;LAYERS&quot;,<br>&gt; Â  Â  Â  Â  &gt; &gt; Â  Â  Â  Â  Â  Â  baseAttrs: {radioGroup: &quot;foo2&quot;}<br>
&gt; Â  Â  Â  Â  &gt; &gt; Â  Â  Â  Â  }<br>&gt; Â  Â  Â  Â  &gt; &gt;<br>&gt; Â  Â  Â  Â  &gt; &gt; That doesnt work... Radio never shows up...<br>&gt; Â  Â  Â  Â  &gt; Andreas Hocevar:<br>&gt; Â  Â  Â  Â  &gt;<br>&gt; Â  Â  Â  Â  &gt; &gt; Yeah, because sub-nodes use a plain TreeNodeUI. If you<br>
&gt; Â  Â  Â  Â  want to use these<br>&gt; Â  Â  Â  Â  &gt; &gt; additional radio buttons, you can try to configure the<br>&gt; Â  Â  Â  Â  LayerParamNodes<br>&gt; Â  Â  Â  Â  &gt; &gt; with a LayerNodeUI. But I doubt that this will work out of<br>
&gt; Â  Â  Â  Â  the box.<br>&gt; Â  Â  Â  Â  &gt; &gt; Otherwise, it requires a custom UI. Patches for a generic<br>&gt; Â  Â  Â  Â  &gt; &gt; additional-radio-button-UI-mixin are welcome.<br>&gt; Â  Â  Â  Â  &gt;<br>&gt; Â  Â  Â  Â  &gt; Now, I悲 like help, and how can I do that custom UI... Any<br>
&gt; Â  Â  Â  Â  help will<br>&gt; Â  Â  Â  Â  &gt; be great...<br>&gt; Â  Â  Â  Â  &gt;<br>&gt; Â  Â  Â  Â  &gt;<br>&gt; Â  Â  Â  Â  &gt; Paul<br>&gt; Â  Â  Â  Â  &gt;<br>&gt; Â  Â  Â  Â  ------------------------------------------------------------------------<br>
&gt; Â  Â  Â  Â  &gt;<br>&gt; Â  Â  Â  Â  &gt; _______________________________________________<br>&gt; Â  Â  Â  Â  &gt; Users mailing list<br></div></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>&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>