check all items in tree
tree.checkAll();
If an id is provided, only the item in the target branch will be checked, otherwise all items in the tree will be checked.