@Override
    protected void processNode(FacesContext context, PhaseId phaseId, TreeNode<?> root, TreeNode<?> treeNode, String rowKey) {
        if (!isPaginator() || root != treeNode) {
            super.processNode(context, phaseId, root, treeNode, rowKey);
        }
        else {
            if (treeNode != null && shouldVisitNode(treeNode) && treeNode.getChildCount() > 0) {
                int first = getFirst();
                int rows = getRows() == 0 ? getRowCount() : getRows();

                processColumnChildren(context, phaseId, root, rowKey);

                TreeNodeChildren<?> children = root.getChildren();
                int childCount = root.getChildCount();
                int last = (first + rows);
                if (last > childCount) {
                    last = childCount;
                }

                for (int i = first; i < last; i++) {
                    TreeNode<?> child = children.get(i);
                    String childRowKey = childRowKey(rowKey, i);
                    processNode(context, phaseId, root, child, childRowKey);
                }
            }
        }
    }
Recalculates filteredValue after adding, updating or removing TreeNodes to/from a filtered TreeTable.
primefaces/src/main/java/org/primefaces/component/treetable/TreeTable.java