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 ; }
Finds the appropriate converter for a given value holder