CLIENT GUI Framework
[vnfsdk/refrepo.git] / portal-common / src / main / webapp / common / thirdparty / zTree / api / en / setting.data.simpleData.pIdKey.html
1 <div class="apiDetail">\r
2 <div>\r
3         <h2><span>String</span><span class="path">setting.data.simpleData.</span>pIdKey</h2>\r
4         <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>\r
5         <div class="desc">\r
6                 <p></p>\r
7                 <div class="longdesc">\r
8                         <p>The node data's attribute to save its parent node data's unique identifier. It is valid when <span class="highlight_red">[setting.data.simpleData.enable = true]</span></p>\r
9                         <p>Default: "pId"</p>\r
10                 </div>\r
11         </div>\r
12         <h3>Examples of setting</h3>\r
13         <h4>1. use the simple data format</h4>\r
14         <pre xmlns=""><code>var setting = {\r
15         data: {\r
16                 simpleData: {\r
17                         enable: true,\r
18                         idKey: "id",\r
19                         pIdKey: "pId",\r
20                         rootPId: 0\r
21                 }\r
22         }\r
23 };\r
24 var treeNodes = [\r
25     {"id":1, "pId":0, "name":"test1"},\r
26     {"id":11, "pId":1, "name":"test11"},\r
27     {"id":12, "pId":1, "name":"test12"},\r
28     {"id":111, "pId":11, "name":"test111"}\r
29 ];\r
30 ......</code></pre>\r
31 </div>\r
32 </div>