Java 类org.springframework.validation.BindingResultUtils 实例源码

项目:sqlapp    文件:LocalDateFormatTest.java   
private String parseAndPrint(String name, String value) throws BindException {
    Map<String, String> paramMap = new HashMap<>();
    paramMap.put(name, value);

    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);
}
项目:sqlapp    文件:CustomNumberFormatTest.java   
private String parseAndPrint(String name, String value) throws BindException {
    Map<String, String> paramMap = new HashMap<>();
    paramMap.put(name, value);

    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);
}
项目:sqlapp    文件:LocalTimeFormatTest.java   
private String parseAndPrint(String name, String value) throws BindException {
    Map<String, String> paramMap = new HashMap<>();
    paramMap.put(name, value);

    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);
}
项目:sqlapp    文件:LocalDateTimeFormatTest.java   
private String parseAndPrint(String name, String value) throws BindException {
    Map<String, String> paramMap = new HashMap<>();
    paramMap.put(name, value);

    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);
}
项目:sqlapp    文件:DateTimeFormatTest.java   
private String parseAndPrint(String name, String value) throws BindException {
    Map<String, String> paramMap = new HashMap<>();
    paramMap.put(name, value);

    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);
}
项目:springapp    文件:LocalDateFormatTest.java   
private String parseAndPrint(String name, String value) throws BindException {
    Map<String, String> paramMap = new HashMap<>();
    paramMap.put(name, value);

    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);
}
项目:springapp    文件:CustomNumberFormatTest.java   
private String parseAndPrint(String name, String value) throws BindException {
    Map<String, String> paramMap = new HashMap<>();
    paramMap.put(name, value);

    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);
}
项目:springapp    文件:LocalTimeFormatTest.java   
private String parseAndPrint(String name, String value) throws BindException {
    Map<String, String> paramMap = new HashMap<>();
    paramMap.put(name, value);

    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);
}
项目:springapp    文件:LocalDateTimeFormatTest.java   
private String parseAndPrint(String name, String value) throws BindException {
    Map<String, String> paramMap = new HashMap<>();
    paramMap.put(name, value);

    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);
}
项目:springapp    文件:DateTimeFormatTest.java   
private String parseAndPrint(String name, String value) throws BindException {
    Map<String, String> paramMap = new HashMap<>();
    paramMap.put(name, value);

    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);
}