}
else {
value = getValue(component);
}
Converter converter = ((ValueHolder)component).getConverter();
if (converter == null && value != null)
{
try
{
converter = facesContext.getApplication().createConverter(value.getClass());
if (log.isDebugEnabled()) log.debug("the created converter is " + converter);
}
catch (FacesException e)
{
log.error("No converter for class " + value.getClass().getName() + " found (component id=" + component.getId() + ").");
// converter stays null
}
}
if (converter == null)
{
if (value == null)
{
if (log.isDebugEnabled()) log.debug("returning an empty string");
return "";
}
if (log.isDebugEnabled()) log.debug("returning an .toString");
return value.toString();
}
if (log.isDebugEnabled()) log.debug("returning converter get as string " + converter);
return converter.getAsString(facesContext, component, value);
}
catch(PropertyNotFoundException ex)
{
log.error("Property not found - called by component : "+getPathToComponent(component),ex);