[Users] Radio Button in Sub-nodes (Treeview)...
Paul james
pauljame at gmail.com
Thu Oct 8 14:48:45 CEST 2009
Thanks for the help Andreas !
Paul
On Thu, Oct 8, 2009 at 5:45 AM, Andreas Hocevar <ahocevar at opengeo.org>wrote:
> 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.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.geoext.org/pipermail/users/attachments/20091008/7120201f/attachment.htm
More information about the Users
mailing list