-
8 Oct 2009 8:12 PM #1
Empty folder in TreePanel?
Empty folder in TreePanel?
I'm getting strange behavior when adding a folder with no children to a treepanel.
When I click on the folder, it expands and then the whole treepanel appears under this folder.Code:{ "text":"Empty Folder", "id":4, "position":2, "leaf":false, "cls":"folder" }
How do I add an empty folder? It's empty now, but I want to add to it later with drag/drop.
-
8 Oct 2009 9:04 PM #2
THe URL you load from must provide the correct children based on the passed id
Search the forum: http://www.google.com/coop/cse?cx=01...%3Az7of1ufqccu
Read the docs too: http://extjs.com/deploy/dev/docs/
Scope: http://extjs.com/forum/showthread.ph...642#post257642
-
8 Oct 2009 9:08 PM #3
-
8 Oct 2009 9:29 PM #4
Right. So you know why you have a problem then.
Search the forum: http://www.google.com/coop/cse?cx=01...%3Az7of1ufqccu
Read the docs too: http://extjs.com/deploy/dev/docs/
Scope: http://extjs.com/forum/showthread.ph...642#post257642
-
8 Oct 2009 9:34 PM #5
-
9 Oct 2009 12:13 AM #6
The server script that you specify in the loader returns the array of child nodes when passed the id.
You must return []Search the forum: http://www.google.com/coop/cse?cx=01...%3Az7of1ufqccu
Read the docs too: http://extjs.com/deploy/dev/docs/
Scope: http://extjs.com/forum/showthread.ph...642#post257642
-
9 Oct 2009 9:07 AM #7
Thank you! I got it working by returning an empty array as you suggested.
PHP Code:$path2['children'] = array();


Reply With Quote