<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('beforeappend', function(tree, parent, node){ </div>
<div>Â node.text = "test";</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"><<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">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's default loader.<br>
<div class="im"><br>Regards,<br>Andreas.<br><br>Paul james wrote:<br></div>
<div class="im">> Update...<br>> The problem was the Format.JSON().write function... It was not<br>> rendering the baseAttrs method...<br>> I put that inside<br>> Â Â Â root: {<br>> Â Â Â Â Â Â nodeType: "async",<br>
> Â Â Â Â Â Â children:<br>> ...<br>><br>> And worked fine...<br>><br>> Thanks Andreas for the great help!<br>><br>> Paul<br>><br>> On Thu, Oct 1, 2009 at 2:26 PM, Paul james <<a href="mailto:pauljame@gmail.com">pauljame@gmail.com</a><br>
</div>
<div class="im">> <mailto:<a href="mailto:pauljame@gmail.com">pauljame@gmail.com</a>>> wrote:<br>><br>> Â Â Thanks again Andreas...<br>> Â Â I tried that code (just added cb variable)...<br>> Â Â But the radio button never shows up... No javascript error<br>
> Â Â reported as well... I think it is not entering in render function ...<br>> Â Â Any idea?<br>><br>> Â Â Â loader: {<br>> Â Â Â Â Â Â Â Â param: "LAYERS",<br>> Â Â Â Â Â Â Â Â baseAttrs: {<br>
> Â Â Â Â Â Â Â Â Â Â uiProvider: Ext.extend(Ext.tree.TreeNodeUI, {<br>> Â Â Â Â Â Â Â Â Â Â Â Â render: function(bulkRender) {<br>> Â Â Â Â Â Â Â Â Â Â Â Â Â Â var cb = this.checkbox; //added<br>><br>><br>
> Â Â Ext.tree.TreeNodeUI.prototype.render.apply(this, arguments);<br>> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Ext.DomHelper.insertAfter(cb, '<input<br>> Â Â type="radio" class="gx-tree-radio" name="radio"></input>' );<br>
> Â Â Â Â Â Â Â Â Â Â Â Â },<br>> Â Â Â Â Â Â Â Â Â Â Â Â onClick: function(e) {<br>> Â Â Â Â Â Â Â Â Â Â Â Â Â Â if(e.getTarget('.gx-tree-radio', 1)) {<br>> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â // do whatever you want to do when<br>
> Â Â radio button was clicked<br>> Â Â Â Â Â Â Â Â Â Â Â Â Â Â }<br>> Â Â Â Â Â Â Â Â Â Â Â Â Â Â else {<br>><br>> Â Â Ext.tree.TreeNodeUI.prototype.onClick.apply(this,arguments);<br>> Â Â Â Â Â Â Â Â Â Â Â Â Â Â }<br>
> Â Â Â Â Â Â Â Â Â Â Â Â }<br>> Â Â Â Â Â Â Â Â Â Â })<br>> Â Â Â Â Â Â Â Â }<br>> Â Â Â Â Â Â }<br>><br>> Â Â Paul<br>><br>> Â Â On Thu, Oct 1, 2009 at 5:35 AM, Andreas Hocevar<br></div>
<div>
<div></div>
<div class="h5">> Â Â <<a href="mailto:ahocevar@opengeo.org">ahocevar@opengeo.org</a> <mailto:<a href="mailto:ahocevar@opengeo.org">ahocevar@opengeo.org</a>>> wrote:<br>><br>> Â Â Â Â Hey Paul,<br>><br>
> Â Â Â Â in the simplest case, it would look something like this:<br>><br>> Â Â Â Â nodeType: "gx_layer",<br>> Â Â Â Â layer: "Tasmania (Group Layer)",<br>> Â Â Â Â isLeaf: false,<br>> Â Â Â Â loader: {<br>
> Â Â Â Â Â Â param: "LAYERS",<br>> Â Â Â Â Â Â baseAttrs: {<br>> Â Â Â Â Â Â Â Â uiProvider: Ext.extend(Ext.tree.TreeNodeUI, {<br>> Â Â Â Â Â Â Â Â Â Â render: function(bulkRender) {<br>><br>> Â Â Â Â Â Ext.tree.TreeNodeUI.prototype.render.apply(this, arguments);<br>
> Â Â Â Â Â Â Â Â Â Â Â Â Ext.DomHelper.insertAfter(cb,<br>> Â Â Â Â Â Â Â Â Â Â Â Â Â '<input type="radio" class="gx-tree-radio"<br>> Â Â Â Â name="radio"></input>'<br>
> Â Â Â Â Â Â Â Â Â Â Â Â );<br>> Â Â Â Â Â Â Â Â Â Â },<br>> Â Â Â Â Â Â Â Â Â Â onClick: function(e) {<br>> Â Â Â Â Â Â Â Â Â Â Â Â if(e.getTarget('.gx-tree-radio', 1)) {<br>> Â Â Â Â Â Â Â Â Â Â Â Â Â Â // do whatever you want to do when radio<br>
> Â Â Â Â button was<br>> Â Â Â Â clicked<br>> Â Â Â Â Â Â Â Â Â Â Â Â } else {<br>><br>> Â Â Â Â Ext.tree.TreeNodeUI.prototype.onClick.apply(this,<br>> Â Â Â Â arguments);<br>> Â Â Â Â Â Â Â Â Â Â Â Â }<br>
> Â Â Â Â Â Â Â Â Â Â }<br>> Â Â Â Â Â Â Â Â })<br>> Â Â Â Â Â Â }<br>> Â Â Â Â }<br>><br>> Â Â Â Â Regards,<br>> Â Â Â Â Andreas.<br>><br>> Â Â Â Â Paul james wrote:<br>> Â Â Â Â > I was talking about that with Andreas :<br>
> Â Â Â Â ><br>> Â Â Â Â > > What I tried to do :<br>> Â Â Â Â > > 1-) Add radio button to Group Layer ...<br>> Â Â Â Â > > nodeType: "gx_layer",<br>> Â Â Â Â > > Â Â Â Â layer: "Tasmania (Group Layer)",<br>
> Â Â Â Â > > Â Â Â Â isLeaf: false,<br>> Â Â Â Â > > Â Â Â Â loader: {<br>> Â Â Â Â > > Â Â Â Â Â Â param: "LAYERS",<br>> Â Â Â Â > > Â Â Â Â Â Â baseAttrs: {radioGroup: "foo2"}<br>
> Â Â Â Â > > Â Â Â Â }<br>> Â Â Â Â > ><br>> Â Â Â Â > > That doesnt work... Radio never shows up...<br>> Â Â Â Â > Andreas Hocevar:<br>> Â Â Â Â ><br>> Â Â Â Â > > Yeah, because sub-nodes use a plain TreeNodeUI. If you<br>
> Â Â Â Â want to use these<br>> Â Â Â Â > > additional radio buttons, you can try to configure the<br>> Â Â Â Â LayerParamNodes<br>> Â Â Â Â > > with a LayerNodeUI. But I doubt that this will work out of<br>
>     the box.<br>>     > > Otherwise, it requires a custom UI. Patches for a generic<br>>     > > additional-radio-button-UI-mixin are welcome.<br>>     ><br>>     > Now, I悲 like help, and how can I do that custom UI... Any<br>
> Â Â Â Â help will<br>> Â Â Â Â > be great...<br>> Â Â Â Â ><br>> Â Â Â Â ><br>> Â Â Â Â > Paul<br>> Â Â Â Â ><br>> Â Â Â Â ------------------------------------------------------------------------<br>
> Â Â Â Â ><br>> Â Â Â Â > _______________________________________________<br>> Â Â Â Â > Users mailing list<br></div></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><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>