public static boolean isNestedWithinIterator(UIComponent component) {
        UIComponent parent = component;
        while (null != (parent = parent.getParent())) {
            if (parent instanceof jakarta.faces.component.UIData || isUIRepeat(parent)
                    || (parent instanceof UITabPanel && ((UITabPanel) parent).isRepeating())) {
                return true;
            }
        }

        return false;
    }
Hack for Mojarra as our UIData is copied from Mojarra.
This is required because the way how UIData is implemented in Mojarra requires to check for parent iterator-components.

@param component
@return
primefaces/src/main/java/org/primefaces/util/ComponentUtils.java