TreePanel and JSON TreeLoader Problem (new nodes invisible)
Published by: wktd 2009-01-07
TreeLoader and custom node value sent to server - Ext JS Forums:: 3 posts - Last post: Feb 16, 2007So, I thought about modifying the TreeLoader class. . TreePanel and JSON TreeLoader Problem (new nodes invisible), sjanes71, Ext: Help http://extjs.com/forum/showthread.php?t=2295HOME
Hello YUI-EXT hackers!
I have a TreePanel that is dynamically loading its data from a JSON query and while it loads the data fine, it insists on making the nodes invisible. Is there something obvious I'm missing to how TreePanel's render newly imported nodes? The first level of nodes load and are visible, subsequent levels are not.
var tree__eF9sYWJlbF90b3BpY3M = function(){
var Tree = Ext.tree;
return {
init: function(){
var tree = new Tree.TreePanel('tree__eF9sYWJlbF90b3BpY3M', {
animate:true,
loader: new Tree.TreeLoader({dataUrl: '/label/navigate_json'}),
});
var root = new Tree.AsyncTreeNode({
text: 'Topics',
draggable:false, // disable root node dragging
id:'topics::'
});
Meta Thought: Oh ExtJS TreePanel Click, wherefore art thou?:: Aug 21, 2008 tree = new Ext.tree.TreePanel({ loader: new Ext.tree.TreeLoader({ Expand invisible root node to trigger load of the first level of http://charlmatthee.blogspot.com/2008/08/oh-extjs-treepanel-click-wherefore-art.htmlHOME
new Tree.TreeSorter(tree, {folderSort:true});
tree.setRootNode(root);
And I think that I'm including the correct CSS because it does show the folder icons and tree lines connecting the nodes.
Thanks in advance for any ideas!
--Simon
ok I got back home copied and paste your code in a test file and tried your code out.
TreeLoader JSON schema, rendering, sorting - Ext JS Forums:: TreePanel and JSON TreeLoader Problem (new nodes invisible), sjanes71, Ext: Help , 32, 05-11-2007 10:55 AM. Extending a JSON schema, gordon, Ext: Help http://yui-ext.com/forum/showthread.php?t=1447HOME
TreePanel and JSON TreeLoader Problem (new nodes invisible) - Page :: Page 3-TreePanel and JSON TreeLoader Problem (new nodes invisible) Ext: Help. TreePane dynamically loads in nodes from a JSON TreeLoader. http://www.extjs.net/forum/showthread.php?t=3512&page=3HOME
I removed the extra comma after your loader declaration and here's what I got:
http://i3.tinypic.com/2r6z29u.png
here's the html file:
I have my reaons for the crazy variable name. :)
TreePanel and JSON TreeLoader Problem (new nodes invisible) - Page :: 10 posts - Last post: Mar 21, 2007Page 3-TreePanel and JSON TreeLoader Problem (new nodes invisible) Ext: Help. the expanded nodes are invisible from the first expand. http://extjs.com/forum/showthread.php?t=3512&page=3HOME
tg-extjs-sample: changeset 1:f49cb72f2260:: + <li>Ability to specify dataUrl or a TreeLoader config in addition to a TreeLoader instance</li>. + <li>New nodeTypes support for more flexible node http://freehg.org/u/jorgevargas/tg-extjs-sample/rev/f49cb72f2260HOME
Apologies if this blows out the forum formatting, images changed to PNG's so they are more legible.
Before:
http://www.recursism.com/images/tree-sample.png
loader: new Tree.TreeLoader({dataUrl: '/label/navigate_json'}),
You have an errant comma. Get rid of the comma and try again.
Bernard, I meant your reply. I see simon posted his capture, as you asked. Why does the open branch simply not render? (I had that happen to me too, but accidently trashed my sample.)
Eager to see some replies
May I see the response as well? I might sound a bit annoying here but thats how I debug when I don't see obvious errors in the code. :) and if you use the inspect function on the TreePanel, do you see those LI html tags?
that's one hell of a variable name Simon : tree__eF9sYWJlbF90b3BpY3M! :lol:
seriously I don't see any obvious errors here. can you post a screenshot with firebug's console open or a link?