@Override
        public VisitResult invokeVisitCallback(UIComponent component, VisitCallback callback) {
            VisitResult result = super.invokeVisitCallback(component, callback);
            if (result == VisitResult.REJECT) {
                if (rejectedChildren == null) {
                    rejectedChildren = new HashSet<>();
                }
                rejectedChildren.add(component);
            }
            return result;
        }
Enhanced version of the Faces UIData.
primefaces/src/main/java/org/primefaces/component/api/PrimeUIData.java