-
19 Jan 2009 9:01 AM #21
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
A lot of valuable info at:
Saki's Extensions and Plugins
Saki's Extensions and Plugins Docs
Saki's Examples, Latest: Grid in Card Layout
Saki's Blog, Featured: Writing a Big Application in Ext, Latest: Grid MultiSearch Plugin Video
-
19 Jan 2009 10:05 AM #22
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); } },
-
19 Jan 2009 11:08 AM #23
Jozef Sakalos, aka Saki
A lot of valuable info at:
Saki's Extensions and Plugins
Saki's Extensions and Plugins Docs
Saki's Examples, Latest: Grid in Card Layout
Saki's Blog, Featured: Writing a Big Application in Ext, Latest: Grid MultiSearch Plugin Video
-
19 Jan 2009 1:00 PM #24
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 {...}}
-
19 Jan 2009 4:41 PM #25
There is always other way, however, if your way reliably works it is the way for you.
Jozef Sakalos, aka Saki
A lot of valuable info at:
Saki's Extensions and Plugins
Saki's Extensions and Plugins Docs
Saki's Examples, Latest: Grid in Card Layout
Saki's Blog, Featured: Writing a Big Application in Ext, Latest: Grid MultiSearch Plugin Video
-
2 Feb 2009 1:52 PM #26
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.
-
2 Feb 2009 2:06 PM #27
Wrong forum - this is about TreeFilterX. Anyway: root.expand(true, false)
Jozef Sakalos, aka Saki
A lot of valuable info at:
Saki's Extensions and Plugins
Saki's Extensions and Plugins Docs
Saki's Examples, Latest: Grid in Card Layout
Saki's Blog, Featured: Writing a Big Application in Ext, Latest: Grid MultiSearch Plugin Video
-
3 Feb 2009 12:29 PM #28
-
6 Feb 2009 1:35 AM #29
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?
-
6 Feb 2009 1:49 AM #30
Be please specific so I know where to look.
Jozef Sakalos, aka Saki
A lot of valuable info at:
Saki's Extensions and Plugins
Saki's Extensions and Plugins Docs
Saki's Examples, Latest: Grid in Card Layout
Saki's Blog, Featured: Writing a Big Application in Ext, Latest: Grid MultiSearch Plugin Video


Reply With Quote
