T - The type to bind the data to.public class RequestDataBinder<T>
extends org.springframework.validation.DataBinder
DataBinder that uses a Request to bind its values to the target object.Webservice, as shown below:
byte[] processRequest(Site site, Application application, Environment environment, Request request)
throws BusinessException;
RequestDataBinder requestDataBinder = new RequestDataBinder(new Person(), request);
Person person = requestDataBinder.bind();
// proceed with person
}
Also note the possibility to set a custom ConversionService for the binder.| Modifier | Constructor and Description |
|---|---|
protected |
RequestDataBinder(T target) |
|
RequestDataBinder(T target,
Request request)
Constructs a new
RequestDataBinder using a DefaultConversionService |
|
RequestDataBinder(T target,
Request request,
org.springframework.core.convert.ConversionService conversionService)
Constructs a new
RequestDataBinder using the given ConversionService |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addValue(org.springframework.beans.MutablePropertyValues mpvs,
String name,
List<?> values) |
T |
bind()
Performs the actual binding.
|
addCustomFormatter, addCustomFormatter, addCustomFormatter, addValidators, applyPropertyValues, bind, checkAllowedFields, checkRequiredFields, close, convertIfNecessary, convertIfNecessary, convertIfNecessary, createBeanPropertyBindingResult, createDirectFieldBindingResult, doBind, findCustomEditor, getAllowedFields, getAutoGrowCollectionLimit, getBindingErrorProcessor, getBindingResult, getConversionService, getDisallowedFields, getInternalBindingResult, getObjectName, getPropertyAccessor, getPropertyEditorRegistry, getRequiredFields, getSimpleTypeConverter, getTarget, getTypeConverter, getValidator, getValidators, initBeanPropertyAccess, initDirectFieldAccess, isAllowed, isAutoGrowNestedPaths, isIgnoreInvalidFields, isIgnoreUnknownFields, registerCustomEditor, registerCustomEditor, replaceValidators, setAllowedFields, setAutoGrowCollectionLimit, setAutoGrowNestedPaths, setBindingErrorProcessor, setConversionService, setDisallowedFields, setExtractOldValueForEditor, setIgnoreInvalidFields, setIgnoreUnknownFields, setMessageCodesResolver, setRequiredFields, setValidator, validate, validatepublic RequestDataBinder(T target, Request request)
RequestDataBinder using a DefaultConversionServicetarget - the target objectrequest - the Requestpublic RequestDataBinder(T target, Request request, org.springframework.core.convert.ConversionService conversionService)
RequestDataBinder using the given ConversionServicetarget - the target objectrequest - the RequestconversionService - the ConversionService to useprotected RequestDataBinder(T target)
public T bind()
RequestContainer.getParameterNames() and RequestContainer.getFormUploads()
is used.Copyright © 2011–2023 aiticon GmbH. All rights reserved.