check all child on load

Hi Support,

I have only one higher level node in tree. All child of that node are childless.

Checkbox is enabled .

Now when tree loads the first and only higher level node populates on the page. When I click on the node or + image all child comes from servlet. I want the state(checked or unchecked) of only node in the servlet, when childes are populated. So that I can check all child if parent is checked.

But what my problem is I am not able to pass any parameter to servlet regarding the state of parent.

How to pass that?


Can I have control after tree loads? So that I can run any js code .

I just tried



But it dosent help

How to achieve by both ways?


You can use the userdata functionality. It can be set for the 1-level item from the xml which contains child items.

For example, the xml with child items is as follows:

    <item …/>

And when child item are loaded, the parent item (its id is “1”) will be checked:

    if(tree.getUserData(id,“checked”)) tree.setCheck(id,1);