<div>Update...</div>
<div>The problem was the Format.JSON().write function... It was not rendering the baseAttrs method...</div>
<div>I put that inside </div>
<div> root: {<br> nodeType: "async", <br> children:</div>
<div>...</div>
<div> </div>
<div>And worked fine...</div>
<div> </div>
<div>Thanks Andreas for the great help!</div>
<div> </div>
<div>Paul<br><br></div>
<div class="gmail_quote">On Thu, Oct 1, 2009 at 2:26 PM, Paul james <span dir="ltr"><<a href="mailto:pauljame@gmail.com">pauljame@gmail.com</a>></span> wrote:<br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">
<div>Thanks again Andreas...</div>
<div>I tried that code (just added cb variable)...</div>
<div>But the radio button never shows up... No javascript error reported as well... I think it is not entering in render function ...</div>
<div>Any idea?</div>
<div> </div>
<div>
<div class="im"> loader: {<br> param: "LAYERS",<br> baseAttrs: {<br> uiProvider: Ext.extend(Ext.tree.TreeNodeUI, {<br> render: function(bulkRender) {<br></div>
var cb = this.checkbox; //added
<div class="im"><br> Ext.tree.TreeNodeUI.prototype.render.apply(this, arguments);<br> Ext.DomHelper.insertAfter(cb, '<input 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 radio button was clicked<br>
}<br> else {<br> Ext.tree.TreeNodeUI.prototype.onClick.apply(this,arguments);<br> }<br> }<br> })<br>
}<br> }<br></div></div><font color="#888888">
<div> </div>
<div>Paul<br> </div></font>
<div>
<div></div>
<div class="h5">
<div class="gmail_quote">On Thu, Oct 1, 2009 at 5:35 AM, Andreas Hocevar <span dir="ltr"><<a href="mailto:ahocevar@opengeo.org" target="_blank">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 Paul,<br><br>in the simplest case, it would look something like this:<br>
<div><br>nodeType: "gx_layer",<br>layer: "Tasmania (Group Layer)",<br>isLeaf: false,<br>loader: {<br> param: "LAYERS",<br> baseAttrs: {<br></div> uiProvider: Ext.extend(Ext.tree.TreeNodeUI, {<br>
render: function(bulkRender) {<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 button was<br>
clicked<br> } else {<br> Ext.tree.TreeNodeUI.prototype.onClick.apply(this,<br>arguments);<br> }<br> }<br> })<br> }<br>}<br><br>Regards,<br>Andreas.<br>
<div><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 want to use these<br>> > additional radio buttons, you can try to configure the LayerParamNodes<br>
> > with a LayerNodeUI. But I doubt that this will work out of the box.<br>> > Otherwise, it requires a custom UI. Patches for a generic<br>> > additional-radio-button-UI-mixin are welcome.<br>><br></div>
> Now, I悲 like help, and how can I do that custom UI... Any help will<br>> be great...<br>><br>><br>> Paul<br>> ------------------------------------------------------------------------<br>><br>> _______________________________________________<br>
> Users mailing list<br>> <a href="mailto:Users@geoext.org" target="_blank">Users@geoext.org</a><br>> <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><font color="#888888"><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></font></blockquote></div>
<br></div></div></blockquote></div><br>