Results 1 to 2 of 2

Thread: TreeLoader with dynamic dataUrl

  1. #1

    Default TreeLoader with dynamic dataUrl

    Hello,

    I would like to generate a tree with different shapes based on remote DB. I thought I would pass some data through GET query string to the webserver.

    In other words, I thought I need to change "dataUrl" of TreeLoader and then do "load()". There problem is, TreeLoader has no public properties.

    Is there a way to do it? I looked around here and found a few threads but none of them quite worked:

    http://www.sencha.com/forum/showthre...-in-ColumnTree
    http://www.sencha.com/forum/showthre...config-options

    (I'm using 3.3.1)

  2. #2

    Default

    Just for the record:

    (from Docs http://dev.sencha.com/deploy/dev/doc...ree.TreeLoader)

    To pass extra parameters, an event handler may be attached to the "beforeload" event, and the parameters specified in the TreeLoader's baseParams property:

    Code:
    myTreeLoader.on("beforeload", function(treeLoader, node) {
            this.baseParams.category = node.attributes.category;
        }, this);
    This would pass an HTTP parameter called "category" to the server containing the value of the Node's "category" attribute.

Similar Threads

  1. Should I be using treeLoader or dataUrl?
    By Elijah in forum Ext 3.x: Help & Discussion
    Replies: 5
    Last Post: 17 May 2010, 10:43 AM
  2. Using a store instead of dataUrl for TreeLoader
    By valc in forum Ext 3.x: Help & Discussion
    Replies: 2
    Last Post: 12 May 2010, 7:47 AM
  3. TreeLoader dataUrl problem...
    By ilker in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 7 Nov 2008, 7:04 AM
  4. dataUrl not working with TreeLoader
    By topcoder1 in forum Ext 1.x: Help & Discussion
    Replies: 1
    Last Post: 7 Apr 2008, 2:23 PM
  5. TreeLoader dataUrl - Struts file
    By monica in forum Ext 1.x: Help & Discussion
    Replies: 6
    Last Post: 1 Apr 2008, 11:40 AM

Tags for this Thread

Posting Permissions

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