The problem that I'm running into, is that on the tree, chec

The problem that I’m running into, is that on the tree, checking the
root selects everything underneath, and checking the parent selects everything
under it. (as it should) However, no code exists to handle these two instances.
There is, however, code to handle the child nodes.

My question is:

How can I disable the root and parent nodes from
selecting the child nodes, but allowing the child node (when selected) to
select the parent node?

The tree doesn’t support such behaviour, but you can use one of next two workarounds:

 a)
Define top level checkboxes as disabled (disableCheckbox method, or
“disabled” attribute in XML)

 b)
Create custom onCheck handler

tree.enableThreeStateCheckboxes(false);

tree.setOnCheckHandler(function(id,state){

                if(!tree.hasChildren(id)){

                               tree.enableThreeStateCheckboxes(true);

                               var
item=tree._globalIdStorageFind(tree.getParentId(id));

                               tree._correctCheckStates(item,state);

                               tree.enableThreeStateCheckboxes(false);

                               }

                else tree.setCheck(id,!state);

});

such code allows checking only of “leaf” items in tree.