Results 1 to 3 of 3

Thread: Async TreePanel with javascript function

  1. #1

    Default Async TreePanel with javascript function

    Hello everbody,

    i got an problem as i tryed to reload data for a TreePanel. Normally you can set the "dataUrl" and the Tree will load the new data if you expand a node. In my way i will not call a URI to reload the data. I need to call a javascript function, which will give me the new data for the expanded node.
    Is this possible? And has someone some example code for this problem?


  2. #2
    Sencha User
    Join Date
    Mar 2007
    The Netherlands


    You can specify a directFn instead of a dataUrl in the TreeLoader config.

  3. #3


    Nice idea. But how can i give back the response for the tree? I have my TreeLoader configuration
    loader: new Ext.tree.TreeLoader({
            		directFn: myfunc
    and my function
        function myfunc(elem, test)
        return [{"text":"index.html","id":"\/index.html","leaf":true,"cls":"file"}];
    the first argument in the function is the node id, the second a unknown function for me. But if i return a JSON Object nothing happens. In the documentation i only can read "Function to call when executing a request." No word about how returning a JSON Object for the node.

Similar Threads

  1. Select node by id using Async TreePanel
    By aromero in forum Ext 2.x: Help & Discussion
    Replies: 4
    Last Post: 4 Nov 2011, 7:09 AM
  2. Expand Async TreePanel Node
    By [email protected] in forum Ext GWT: Discussion
    Replies: 5
    Last Post: 13 Sep 2010, 12:47 PM
  3. TreePanel from XML file (not ASYNC)
    By Ced4ver in forum Ext GWT: Discussion
    Replies: 0
    Last Post: 28 Sep 2009, 1:39 AM
  4. Async TreePanel
    By alessandro in forum Ext 3.x: Help & Discussion
    Replies: 1
    Last Post: 14 Sep 2009, 1:28 AM
  5. What is the absolute last even fired in Async TreePanel
    By zooxmusic1 in forum Ext GWT: Discussion
    Replies: 1
    Last Post: 8 Jul 2009, 8:17 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts