in myfaces-html5-core/src/main/java/org/apache/myfaces/html5/renderkit/util/RendererUtils.java [87:121]
public static Converter findUIOutputConverter(FacesContext facesContext,
UIOutput component)
throws FacesException
{
// Attention!
// This code is duplicated in jsfapi component package.
// If you change something here please do the same in the other class!
Converter converter = component.getConverter();
if (converter != null)
return converter;
//Try to find out by value expression
ValueExpression expression = component.getValueExpression("value");
if (expression == null)
return null;
Class valueType = expression.getType(facesContext.getELContext());
if (valueType == null)
return null;
if (Object.class.equals(valueType))
return null; //There is no converter for Object class
try
{
return facesContext.getApplication().createConverter(valueType);
}
catch (FacesException e)
{
log(facesContext, "No Converter for type " + valueType.getName()
+ " found", e);
return null;
}
}