Assert.notNull(facesContext, "FacesContext.getCurrentInstance() returned null. " +
"You should use @Deferred so the binding gets executed within the JSF lifecycle.");
String valueAsString = value != null ? value.toString() : null;
try {
return (T) converter.getAsObject(facesContext, new NullComponent(), valueAsString);
}
catch (ConverterException e) {
return null; // TODO: is this correct
}
}