[Users] Radio Button in Sub-nodes (Treeview)...
Andreas Hocevar
ahocevar at opengeo.org
Thu Oct 8 10:45:46 CEST 2009
Paul james wrote:
> You are right, It works, but it dont turns on/off the children´s
> checkboxes... Is that a way to do that? It´s kind useless that way...
Sure there is a way. Just add a checkchange handler to the container
node and set its childNodes to the same checked attribute value. More
details can be found in the Ext JS documentation of Ext.tree.*
(http://www.extjs.com/deploy/dev/docs/).
Regards,
Andreas.
>
> Paul
>
> On Wed, Oct 7, 2009 at 4:02 PM, Andreas Hocevar <ahocevar at opengeo.org
> <mailto:ahocevar at opengeo.org>> wrote:
>
> Hey-
>
> where exactly did you set the checked attribute? Because this is
> exactly
> how it should work.
>
> Note though that a checkbox won't be connected to children's
> checkboxes
> in Ext.
>
> Regards,
> Andreas.
>
> Paul james wrote:
> > Thanks Andreas!
> >
> > Jumping to the last question..
> > I have that tree configuration :
> >
> > {
> > id: 'Transporte',
> > text:
> > 'Transporte',
> > children:
> > [
> > {
> > id: 'Rodoviario',
> > text:
> > 'Rodoviario',
> > children:
> > [
> > {
> > nodeType: "gx_layer",
> > id: "RodoviaFederal",
> > layer: "Rodovia Federal",
> > isLeaf:
> > false,
> > loader: {
> > param: "LAYERS",
> > ...
> >
> > The checkbox is only generated in last level ( RodoviaFederal and
> > sublayers) ... How can I generate checkbox for all levels? Using
> > "checked" attribute, it appers, but doest work ... Any idea?
> >
> > Paul
> >
> > On Wed, Oct 7, 2009 at 4:09 AM, Andreas Hocevar
> <ahocevar at opengeo.org <mailto:ahocevar at opengeo.org>
> > <mailto:ahocevar at opengeo.org <mailto:ahocevar at opengeo.org>>> wrote:
> >
> > Paul james wrote:
> > > About my other problem (Change sublayer label on treeview) ...
> > > I tried with that :
> > >
> > > tree.on('beforeappend', function(tree, parent, node){
> > > node.text = "test";
> > > });
> > >
> > > It only changes the last child... Can you help me on that?
> >
> > I think so. Because the visual representation of the layer order
> > is the
> > other way around as the layer stack, nodes are inserted
> rather than
> > appended. Try the following:
> >
> > function setText(tree, parent, node) {
> > node.text = "test";
> > }
> > tree.on({
> > beforeappend: setText,
> > beforeinsert: setText
> > });
> >
> > Regards,
> > Andreas.
> >
> > --
> > Andreas Hocevar
> > OpenGeo - http://opengeo.org/
> > Expert service straight from the developers.
> >
> >
> >
> ------------------------------------------------------------------------
> >
> > _______________________________________________
> > Users mailing list
> > Users at geoext.org <mailto: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.
>
>
--
Andreas Hocevar
OpenGeo - http://opengeo.org/
Expert service straight from the developers.
More information about the Users
mailing list