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


    Once again, FileTreeX has no UI so if you have difficulties with displaying anything it is most likely not related to the extension. Also, I wouldn't discuss off-topic matters here to not confuse other readers.

    Post please your question/problem in a separate thread if it is not a FileTreeX specific question/problem.
    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
    Ext User zhegwood's Avatar
    Join Date
    Dec 2007
    Location
    Boulder, CO Suburbia (Lafayette)
    Posts
    388
    Vote Rating
    1
    zhegwood is on a distinguished road

      0  

    Default


    OK, removed it...

    I am kind of stuck right now. I must admit that I don't have a lot of experience working with tree panels, but I'm trying to use this extension to choose a form value from a tree. The reason I'm using a tree and not a combo is some child nodes will have the same values, but fall under different parent nodes.

    Anyway, I want to select the first node after the filter has been applied and then have the ability to arrow up and arrow down through the filtered nodes and press "Enter" to select the highlighted node.

    I figure the selection would happen where my comment is, and I figure I can add key listeners to the tree panel to handle the arrow up, arrow down and enter, but I can't find how to get access to the nodes through the tree object. I've used this.tree.nodeHash and also this.tree.getSelectionModel(), but I don't see where the nodes are listed:
    Code:
    	filter: function(value,attr,startNode) {
    
    		// expand start node
    		if(false!==this.expandOnFilter) {
    			startNode=startNode||this.tree.root;
    			var animate=this.tree.animate;
    			this.tree.animate=false;
    			startNode.expand(true,false,function() {
    
    			// call parent after expand
    				AV.TreeFilterX.superclass.filter.call(this,value,attr,startNode);
    
    			}.createDelegate(this));
    			this.tree.animate=animate;
    
    			console.log(this.tree,this.tree.getSelectionModel()); //don't see a getNodes() or similar function or a list of nodes w/in the properties
    			for (var node in this.tree.nodeHash) {
    				console.log(node + " " + this.tree.nodeHash[node])
    				//only returns text
    			}
    
    		} else {
    			// call parent
    			AV.TreeFilterX.superclass.filter.apply(this,arguments);
    		}
    
    	},

  3. #23
    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


    Have you seen http://checktree.extjs.eu ? It can be combined with TreeFilterX.
    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


  4. #24
    Ext User zhegwood's Avatar
    Join Date
    Dec 2007
    Location
    Boulder, CO Suburbia (Lafayette)
    Posts
    388
    Vote Rating
    1
    zhegwood is on a distinguished road

      0  

    Default


    Quote Originally Posted by jsakalos View Post
    Have you seen http://checktree.extjs.eu ? It can be combined with TreeFilterX.
    Nope, but will use that in the future for sure. Thanks!

    Here's what I did to automatically select the first non-hidden node & also create a reference to the node list from the tree. If there's an easier/better way to do this, let me know but this works as expected:

    Code:
    	filter: function(value,attr,startNode) {
    
    		// expand start node
    		if(false!==this.expandOnFilter) {
    			startNode=startNode||this.tree.root;
    			var animate=this.tree.animate;
    			this.tree.animate=false;
    			startNode.expand(true,false,function() {
    
    			// call parent after expand
    				AV.TreeFilterX.superclass.filter.call(this,value,attr,startNode);
    
    			}.createDelegate(this));
    			this.tree.animate=animate;
    			
    			/* Creates an array of all nodes */
    			var tempArray = [];
    			function addToArray (node) {
    				node.eachChild(function(child){
    					tempArray.push(child);
    					if (child.hasChildNodes()) {
    						addToArray(child);
    					}
    				});
    			}
    			addToArray(startNode);
    			this.tree.nodeArray = tempArray;
    			
    			//highlights the first non-hidden node
    			for (var a = 0; a < this.tree.nodeArray.length; a++) {
    				if (!this.tree.nodeArray[a].hidden) {
    					this.tree.nodeArray[a].select();
    					break;
    				}
    			}
    		} else {...}}

  5. #25
    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


    There is always other way, however, if your way reliably works it is the way for you.
    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


  6. #26
    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 expandAll on render?

    CheckTreePanel expandAll on render?


    I am having a bit of trouble figuring out where to make changes to make the nodes in CheckTreePanel expanded on render. I would like to have all the nodes and leaves expanded when the widget renders. I know Saki is the one to ask, but other comments are appreciated.

  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


    Wrong forum - this is about TreeFilterX. Anyway: root.expand(true, false)
    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
    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
    Wrong forum - this is about TreeFilterX. Anyway: root.expand(true, false)
    Sorry I was jumping around different forums and entered my question in the wrong area.

  9. #29
    Ext User
    Join Date
    Jan 2008
    Posts
    2
    Vote Rating
    0
    honlin is on a distinguished road

      0  

    Default the TreeFilterX works well with ext 2.2, but not in ext 2.02

    the TreeFilterX works well with ext 2.2, but not in ext 2.02


    the TreeFilterX works well with ext 2.2, but not in ext 2.02, have you guys the same problem?

  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


    Be please specific so I know where to look.
    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