[Users] checkcahnge in treepanel loads data twice

Sascha Müller s.mueller76 at arcor.de
Tue Nov 24 14:55:40 CET 2009


Hi,

I want use the checkchange-function to reload Attributes if the Layer 
ist still the aktive one.
I tried this and every time I checked/unchecked the checkboxes of a 
layer, the console
writes two times in a row.

var treePanel = new Ext.tree.TreePanel({
         id: 'lt',
         title: 'Layer',
         region: 'west',
         loader: new Ext.tree.TreeLoader({
           applyLoader: false
         }),
         root: {
           nodeType: "async",
           children: Ext.decode(treeConfig)
         },
         rootVisible: false,
         lines: true,
         enableDD: true,
         split: true,
         autoScroll:true,
         collapsible: true,
         bodyStyle: 'padding:5px;',
         width: 200,
         minSize: 200,
         listeners: {
             'checkchange': function(node, checked){
                 if(checked){
                  console.log("Checked");
             }else{
                  console.log("Unchecked");
             }
        }
    },
});

Is there a way to suppress this behavior? Cause if I have more 
attributes, it needs a lot of time and doesn't look good.


Regards.

Sascha


More information about the Users mailing list