public static Converter getConverter(FacesContext fc, ValueHolder vh) {
		// explicit converter
		Converter converter = vh.getConverter();

		// try to find implicit converter
		if (converter == null) {
			ValueExpression expr = ((UIComponent) vh).getValueExpression("value");
			if (expr != null) {
				Class<?> valueType = expr.getType(fc.getELContext());
				if (valueType != null) {
					converter = fc.getApplication().createConverter(valueType);
				}
			}
		}

		return converter;
	}
public static Converter getConverter ( FacesContext fc , ValueHolder vh ) { Converter converter = vh . getConverter ( ) ; if ( converter == null ) { ValueExpression expr = ( ( UIComponent ) vh ) . getValueExpression ( "value" ) ; if ( expr != null ) { Class < ? > valueType = expr . getType ( fc . getELContext ( ) ) ; if ( valueType != null ) { converter = fc . getApplication ( ) . createConverter ( valueType ) ; } } } return converter ; }
Finds the appropriate converter for a given value holder

@param fc
FacesContext instance
@param vh
ValueHolder instance to look converter for
@return Converter