Results 1 to 4 of 4

Thread: Using dataURL as a TreePanel config

  1. #1
    Sencha User
    Join Date
    Dec 2008
    Location
    Sofia
    Posts
    267

    Default Using dataURL as a TreePanel config

    According to the API Docs for TreePanel, the dataURL config option may be used directly in the TreePanel config object. You can see this in the example code on the same place:

    Code:
    var tree = new Ext.tree.TreePanel({
        renderTo: 'tree-div',
       ...
        // auto create TreeLoader
        dataUrl: 'get-nodes.php',
    
    ...
    });
    If so, can somebody tell me why this config option is NOT included in the API documentation of the TreePanel class, but only within the TreeLoader's one?

    And how a novice like me will understand that TreeLoader will be auto-created? It's quite confusing to me...

    In the "Learning ExtJS" book, within the Trees chapter, the authors instantiate a TreeLoader object first and then use it with the loader config option of the TreePanel.

    Which of these two is better?

    Regards!

  2. #2
    Sencha User Animal's Avatar
    Join Date
    Mar 2007
    Location
    Bédoin/Nottingham
    Posts
    30,890

    Default

    The volunteer documenters are in the same boat as you.

    We have to study the code, see what it does, see what properties from the configuration object are used to do what, and then document that.

    So that innovation, of automatically pulling in a dataUrl from the TreePanel's configuration to use when autocreating a TreeLoader has not been noticed and documented.

    I can't document it, sadly because they've moved to git, and it won't run on Windows, so some other kind soul must do it.

  3. #3
    Sencha User
    Join Date
    Dec 2008
    Location
    Sofia
    Posts
    267

    Default

    Well, so it's a non-documented feature, not an implicit stuff which i missed because i'm a novice... It is important to me to clarify that.

    So far i though that any new Ext Version comes with a up-to-date API docs.

    And, to be honest, the fact that the API is made by volunteers was unknown to me.

    Thanks.

  4. #4

    Default

    FWIW, this just bit me too. The treepanel API doc shows dataUrl being used in the examples, but then does not mention it in the config properties section. Definitely a little confusing.

Posting Permissions

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