1 <div class="apiDetail">
\r
3 <h2><span>Function(parentNode, reloadType, isSilent)</span><span class="path">zTreeObj.</span>reAsyncChildNodes</h2>
\r
4 <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
\r
7 <div class="longdesc">
\r
8 <p>Forced asynchronous loading child nodes of parent node. It is valid when <span class="highlight_red">[setting.async.enable = true]</span></p>
\r
9 <p class="highlight_red">You can use this method to reload child nodes.</p>
\r
10 <p class="highlight_red">Please use zTree object to executing the method.</p>
\r
13 <h3>Function Parameter Descriptions</h3>
\r
15 <h4><b>parentNode</b><span>JSON</span></h4>
\r
16 <p>The parent node which will asynchronous loading child nodes.</p>
\r
17 <p class="highlight_red">1. If parentNode = null, it is same as reload root nodes.</p>
\r
18 <p class="highlight_red">2. If parentNode.isParent = false, don't load nodes.</p>
\r
19 <p class="highlight_red">3. Please ensure that this data object is an internal node data object in zTree.</p>
\r
20 <h4 class="topLine"><b>reloadType</b><span>String</span></h4>
\r
21 <p>reloadType = "refresh" means: reload child nodes.</p>
\r
22 <p>reloadType != "refresh" means: append to load child nodes.</p>
\r
23 <h4 class="topLine"><b>isSilent</b><span>Boolean</span></h4>
\r
24 <p>Set whether to automatically expand the parent node, after load nodes.</p>
\r
25 <p>isSilent = true means: don't auto expand the parent node. Otherwise auto expand.</p>
\r
26 <h4 class="topLine"><b>Return </b><span>none</span></h4>
\r
27 <p>no return value</p>
\r
29 <h3>Examples of function</h3>
\r
30 <h4>1. reload root nodes</h4>
\r
31 <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
\r
32 treeObj.reAsyncChildNodes(null, "refresh");
\r
34 <h4>2. reload the first selected node's child nodes.</h4>
\r
35 <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
\r
36 var nodes = treeObj.getSelectedNodes();
\r
37 if (nodes.length>0) {
\r
38 treeObj.reAsyncChildNodes(nodes[0], "refresh");
\r