CLIENT GUI Framework
[vnfsdk/refrepo.git] / openo-portal / portal-common / src / main / webapp / common / thirdparty / zTree / api / en / treeNode.checked.html
1 <div class="apiDetail">\r
2 <div>\r
3         <h2><span>Boolean</span><span class="path">treeNode.</span>checked</h2>\r
4         <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.excheck</span> js ]</span></h3>\r
5         <div class="desc">\r
6                 <p></p>\r
7                 <div class="longdesc">\r
8                         <p>The checked status about node's checkbox or radio. It is valid when <span class="highlight_red">[setting.check.enable = true & treeNode.nocheck = false]</span></p>\r
9                         <p class="highlight_red">1. If change the 'checked' to other attribute, please set the 'setting.data.key.checked' attribute.</p>\r
10                         <p class="highlight_red">2. If you create node data, and set 'checked' attribute to true, zTree will check this node's checkbox or radio when zTree is initialized.</p>\r
11                         <p class="highlight_red">3. Use the treeObj.checkNode or checkAllNodes or updateNode method, you can check or uncheck the node. Please see the API about these methods.</p>\r
12                         <p class="highlight_red">4. zTree support identification string 'true' & 'false'.</p>\r
13                         <p>Default: false</p>\r
14                 </div>\r
15         </div>\r
16         <h3>Boolean Format</h3>\r
17         <div class="desc">\r
18         <p>true means: check the checkbox or radio when zTree is initialized.</p>\r
19         <p>false means: uncheck the checkbox or radio when zTree is initialized.</p>\r
20         </div>\r
21         <h3>Examples of treeNode</h3>\r
22         <h4>1. check the checkbox when zTree is initialized</h4>\r
23         <pre xmlns=""><code>var nodes = [\r
24 { "id":1, "name":"test1", checked:true },\r
25 { "id":2, "name":"test2", checked:true }\r
26 ]</code></pre>\r
27         <h4>2. Get the checked status of the first root node</h4>\r
28         <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");\r
29 var checked = treeObj.getNodes()[0].checked;\r
30 </code></pre>\r
31 </div>\r
32 </div>