}
}
}
public static void setConverter(UIComponent component, String converterId) {
ValueHolder valueHolder = (ValueHolder) component;
if (converterId != null && valueHolder.getConverter() == null) {
final FacesContext facesContext = FacesContext.getCurrentInstance();
final Application application = facesContext.getApplication();
if (UIComponentTag.isValueReference(converterId)) {
ValueBinding valueBinding = application.createValueBinding(converterId);
component.setValueBinding(ATTR_CONVERTER, valueBinding);
} else {
Converter converter = application.createConverter(converterId);
valueHolder.setConverter(converter);
}
}
}