Results 1 to 4 of 4

Thread: how to add additional parameters when the tree node expand?

  1. #1
    Sencha User
    Join Date
    Sep 2010
    Posts
    10
    Vote Rating
    2
      0  

    Default how to add additional parameters when the tree node expand?

    hi there:
    Recently i am using the ext 4.0.7, and i know that when a node expand, the 'node' param will be send to the server.
    now my question is that can i pass addtional parameters not only 'node' but also other properties of the node?
    for example : a json of my tree node is : {"id" : 1, "text" : "node1", "url" : "http://www.balala.com"}, when this node expande, can i pass parameters like : node=1&url=http://www.balala.com
    thx for ur help

  2. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,698
    Vote Rating
    1279
      1  

    Default

    You can listen to the beforeload event and add in parameters to the operation request.
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

  3. #3
    Sencha User
    Join Date
    Feb 2012
    Posts
    16
    Vote Rating
    0
      0  

    Default

    Could you give some more details? Thanks a lot

  4. #4
    Sencha User
    Join Date
    Sep 2010
    Posts
    10
    Vote Rating
    2
      2  

    Default

    thanks a lot! I finaly figure it out with ur advise.
    Ext.tree.Panel has a event named beforeload and will pass a argument named 'operation' into the callback function.
    In this argument, it has a property named 'params', witch include the parameters will pass to the server.
    and it has another property named 'node', witch is the tree node we just clicked.
    what we have to do is find the parameters from node and set them into the params property, done!

Posting Permissions

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