else
checkedNodes.getObject().remove(node);
}
protected void addRemoveAncestorNodes(T node, Boolean nodeStatus) {
BranchItem currentConatiner = findParent(BranchItem.class);
if(currentConatiner == null) return;
BranchItem ancestor = currentConatiner.findParent(BranchItem.class);
while(ancestor != null)
{
T nodeObject = (T) ancestor.getDefaultModelObject();
if(nodeStatus)
{
checkedNodes.getObject().add(nodeObject);
}
else
{
if(!hasNodeCheckedChildren(nodeObject))
checkedNodes.getObject().remove(nodeObject);
}
ancestor = ancestor.findParent(BranchItem.class);
}
}