private void reset(String clientId) {
            FacesContext context = getFacesContext();
            context.getViewRoot().invokeOnComponent(context, clientId, (fc, component) -> {
                if (!(component instanceof MultiViewStateAware)) {
                    throw new FacesException("Multi view state not supported for: " + component.getClass().getSimpleName());
                }
                ((MultiViewStateAware) component).resetMultiViewState();
            });
        }
Gets multiview state attached to a component in a specific view.

@param viewId viewId of a page
@param clientId clientId of a component
@param <T> bean state generic

@return multiview state bean attached to a component or null
primefaces/src/main/java/org/primefaces/PrimeFaces.java