public static boolean isFlex(FacesContext context, FlexAware component) {
        if (component.getFlex() == null) {
            return PrimeRequestContext.getCurrentInstance(context).isFlex();
        }
        return component.getFlex();
    }
Finds appropriate converter for a given value holder

@param context   FacesContext instance
@param component ValueHolder instance to look up converter for
@return          Converter
primefaces/src/main/java/org/primefaces/util/ComponentUtils.java