@Dependent
public InputElement produceInputElement(final InjectionPoint ip) {
if (isInitialized()) {
String id = ip.getMember().getName();
UIInput component = findComponent(id, id);
components.put(id, component);
InputElement inputElementResult = new InputElement(id, component.getClientId(context), component);
if (component.isLocalValueSet()) {
inputElementResult.setValue(component.getValue());
} else {
Converter converter = component.getConverter();
if (converter != null) {
Object value = converter.getAsObject(context, component, (String) component.getSubmittedValue());
inputElementResult.setValue(value);
} else {
inputElementResult.setValue(component.getSubmittedValue());
}
}
return inputElementResult;
}
return null;