1. #21
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,509
    Vote Rating
    374
    jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future

      0  

    Default


    OK, you can find out which events are fired if you navigate to http://checktree.extjs.eu and then you type in Firebug's console:

    Ext.util.Observable.capture(Ext.getCmp('t2'), function(e){console.log(e);})

    This will capture events from upper right checktree panel.
    Jozef Sakalos, aka Saki

    Education, extensions and services for developers at new http://extjs.eu
    News: Grid Search Plugin, ExtJS 5 Complex Data Binding using MVVM


  2. #22
    Sencha - Training Team mrsunshine's Avatar
    Join Date
    Sep 2008
    Location
    Germany - Darmstadt
    Posts
    690
    Vote Rating
    12
    mrsunshine will become famous soon enough

      0  

    Default


    Quote Originally Posted by jsakalos View Post
    OK, you can find out which events are fired if you navigate to http://checktree.extjs.eu and then you type in Firebug's console:

    Ext.util.Observable.capture(Ext.getCmp('t2'), function(e){console.log(e);})

    This will capture events from upper right checktree panel.
    Cool thank you, the capture snippe helped me a lot.
    PHP Code:
    Ext.util.Observable.capture(Ext.getCmp('t2'), function(e){console.log(e);}) 

  3. #23
    Sencha User jbird526's Avatar
    Join Date
    Jan 2008
    Location
    Westminster, MD
    Posts
    128
    Vote Rating
    0
    jbird526 is on a distinguished road

      0  

    Default ChecktreePanel setChecked all

    ChecktreePanel setChecked all


    I wrote these button functions for my CheckTreePanel and would like your opinion about how long handed and badly formed they are. They do work but I just have a feeling that I am digging to far and they could be simplified.

    Code:
    checkAllTitles: function(){
    		var x = Ext.getCmp('t2');
    		var foo = [];
    		foo = x.root.firstChild.childNodes;
    		for (i = 0; i < foo.length; i++)
    			{
    				foo[i].ui.setChecked(true);
    			}	
    		console.log('checkAllTitles');
    	},
    	
    	checkAllTitlesTopics: function(){
    		var x = Ext.getCmp('t2');
    		var foo = [];
    		foo = x.root.firstChild.childNodes;
    		for (i = 0; i < foo.length; i++)
    			{				
    				foo[i].eachChild(function(n){
    					var ui = n.getUI();
    					ui.setChecked(true);					
    				})				
    			}	
    		console.log('checkAllTitlesTopics');	
    	}






  4. #24
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,509
    Vote Rating
    374
    jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future

      0  

    Default


    Hmm, if it works it's fine. We could spend ages on speculating if it could have been written other way or better. Works? Yes? Go ahead and use them in your app.
    Jozef Sakalos, aka Saki

    Education, extensions and services for developers at new http://extjs.eu
    News: Grid Search Plugin, ExtJS 5 Complex Data Binding using MVVM


  5. #25
    Sencha User jbird526's Avatar
    Join Date
    Jan 2008
    Location
    Westminster, MD
    Posts
    128
    Vote Rating
    0
    jbird526 is on a distinguished road

      0  

    Default


    Quote Originally Posted by jsakalos View Post
    Hmm, if it works it's fine. We could spend ages on speculating if it could have been written other way or better. Works? Yes? Go ahead and use them in your app.
    Thats usually what I say also. I've been stepping thru your code to understand how everything works. Appreciate the lengths that you go thru to release code that helps those of us that are not as gray matter blessed.

    Thanx for the reply, maybe the code will make shorter work for someone else.

  6. #26
    Ext User
    Join Date
    Jan 2009
    Posts
    6
    Vote Rating
    0
    wyyacyy is on a distinguished road

      0  

    Default Help!treepanel with checkbox

    Help!treepanel with checkbox


    I want to build a treepanel with checkbox. I user struts2,How do I return a json array ?
    what should I care about?

    JSON[{"checked":false,"children":[{"checked":false,"children":[],"cls":"file","id":11,"leaf":true,"text":"S600"},{"checked":false,"children":[],"cls":"file","id":12,"leaf":true,"text":"SLK200"}],"cls":"folder","id":10,"leaf":false,"text":"Benz"}]

    the checkbox canot show ,why?

  7. #27
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,509
    Vote Rating
    374
    jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future

      0  

    Default


    Sorry, I cannot help you with server-side, I don't even know what is struts2. The json you posted is not valid and cannot be decoded (Ext.decode(that-what-you-posted).
    Jozef Sakalos, aka Saki

    Education, extensions and services for developers at new http://extjs.eu
    News: Grid Search Plugin, ExtJS 5 Complex Data Binding using MVVM


  8. #28
    Ext User
    Join Date
    Jan 2009
    Posts
    6
    Vote Rating
    0
    wyyacyy is on a distinguished road

      0  

    Default Thank you .

    Thank you .


    Thanking for replying

  9. #29
    Sencha User jbird526's Avatar
    Join Date
    Jan 2008
    Location
    Westminster, MD
    Posts
    128
    Vote Rating
    0
    jbird526 is on a distinguished road

      0  

    Default Thanx again Saki

    Thanx again Saki


    Saki thanx again for making this extension available. It has saved me a bunch of time and has helped me understand how to manipulate trees. PS I made a donation, which I hope others will follow my example.

  10. #30
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,509
    Vote Rating
    374
    jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future

      0  

    Default


    Thank you very much for both your kind words and the donation.
    Jozef Sakalos, aka Saki

    Education, extensions and services for developers at new http://extjs.eu
    News: Grid Search Plugin, ExtJS 5 Complex Data Binding using MVVM