<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>