[Users] Radio Button in Sub-nodes (Treeview)...
Andreas Hocevar
ahocevar at opengeo.org
Thu Oct 1 10:35:09 CEST 2009
Hey Paul,
in the simplest case, it would look something like this:
nodeType: "gx_layer",
layer: "Tasmania (Group Layer)",
isLeaf: false,
loader: {
param: "LAYERS",
baseAttrs: {
uiProvider: Ext.extend(Ext.tree.TreeNodeUI, {
render: function(bulkRender) {
Ext.tree.TreeNodeUI.prototype.render.apply(this, arguments);
Ext.DomHelper.insertAfter(cb,
'<input type="radio" class="gx-tree-radio"
name="radio"></input>'
);
},
onClick: function(e) {
if(e.getTarget('.gx-tree-radio', 1)) {
// do whatever you want to do when radio button was
clicked
} else {
Ext.tree.TreeNodeUI.prototype.onClick.apply(this,
arguments);
}
}
})
}
}
Regards,
Andreas.
Paul james wrote:
> I was talking about that with Andreas :
>
> > What I tried to do :
> > 1-) Add radio button to Group Layer ...
> > nodeType: "gx_layer",
> > layer: "Tasmania (Group Layer)",
> > isLeaf: false,
> > loader: {
> > param: "LAYERS",
> > baseAttrs: {radioGroup: "foo2"}
> > }
> >
> > That doesnt work... Radio never shows up...
> Andreas Hocevar:
>
> > Yeah, because sub-nodes use a plain TreeNodeUI. If you want to use these
> > additional radio buttons, you can try to configure the LayerParamNodes
> > with a LayerNodeUI. But I doubt that this will work out of the box.
> > Otherwise, it requires a custom UI. Patches for a generic
> > additional-radio-button-UI-mixin are welcome.
>
> Now, I´d like help, and how can I do that custom UI... Any help will
> be great...
>
>
> Paul
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> Users at geoext.org
> http://www.geoext.org/cgi-bin/mailman/listinfo/users
>
--
Andreas Hocevar
OpenGeo - http://opengeo.org/
Expert service straight from the developers.
More information about the Users
mailing list