List of usage examples for org.springframework.validation BindingResult getFieldValue
@Nullable Object getFieldValue(String field);
From source file:cherry.foundation.type.format.CustomNumberFormatTest.java
private String parseAndPrint(String name, String value) throws BindException { Map<String, String> paramMap = new HashMap<>(); paramMap.put(name, value);/*from w w w. j a va 2 s .c o m*/ Form form = new Form(); DataBinder binder = new DataBinder(form, "target"); binder.setConversionService(conversionService); binder.bind(new MutablePropertyValues(paramMap)); BindingResult binding = BindingResultUtils.getBindingResult(binder.close(), "target"); return (String) binding.getFieldValue(name); }