setting.async.autoParam.html 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <div class="apiDetail">
  2. <div>
  3. <h2><span>Array(String)</span><span class="path">setting.async.</span>autoParam</h2>
  4. <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
  5. <div class="desc">
  6. <p></p>
  7. <div class="longdesc">
  8. <p>Required automatically submit the parameters about the properties of the parent node, when the asynchronous load. It is valid when <span class="highlight_red">[setting.async.enable = true]</span></p>
  9. <p>Default:[ ]</p>
  10. </div>
  11. </div>
  12. <h3>Array(String) Format</h3>
  13. <div class="desc">
  14. <p>1. Just save the attribute name of node to the array. For example: ["id", "name"]</p>
  15. <p>2. You can change the parameter name. For example: server only accepts "zId" -- ["id=zId"]</p>
  16. </div>
  17. <h3>Examples of setting</h3>
  18. <h4>1. set auto commit 'id' attribute</h4>
  19. <pre xmlns=""><code>var setting = {
  20. async: {
  21. enable: true,
  22. url: "http://host/getNode.php",
  23. autoParam: ["id"]
  24. }
  25. };
  26. If have the parent node: {id:1, name:"test"}, When asynchronously load this parent node's child nodes, will be submitted parameters: id=1
  27. ......</code></pre>
  28. <h4>2. set auto commit 'id' attribute, but parameter name is 'zId'</h4>
  29. <pre xmlns=""><code>var setting = {
  30. async: {
  31. enable: true,
  32. url: "http://host/getNode.php",
  33. autoParam: ["id=zId"]
  34. }
  35. };
  36. If have the parent node: {id:1, name:"test"}, When asynchronously load this parent node's child nodes, will be submitted parameters: zId=1
  37. ......</code></pre>
  38. </div>
  39. </div>