public Menu getOptionsMenu() {
        UIComponent optionsFacet = getFacet("options");
        if (FacetUtils.shouldRenderFacet(optionsFacet)) {
            if (optionsFacet instanceof Menu) {
                return (Menu) optionsFacet;
            }
            else {
                return (Menu) optionsFacet.getChildren().get(0);
            }
        }
        return null;
    }
In case of a repeating parent (var=...), we need to store the state on row basis.
This is actually a workaround because neither UITabPanel, not UIRepeat has a rowStatePreserved attribute.

@param index The tab index.
@param value The loaded state.
primefaces/src/main/java/org/primefaces/component/tabview/Tab.java