Example usage for Java org.springframework.validation DataBinder fields, constructors, methods, implement or subclass
The text is from its open source code.
DataBinder(@Nullable Object target, String objectName) Create a new DataBinder instance. | |
DataBinder(@Nullable Object target) Create a new DataBinder instance, with default object name. |
void | addValidators(Validator... validators) Add Validators to apply after each binding step. |
void | bind(PropertyValues pvs) Bind the given property values to this binder's target. |
Map,?> | close() Close this DataBinder, which may result in throwing a BindException if it encountered any errors. |
T | convertIfNecessary(@Nullable Object value, @Nullable Class |
T | convertIfNecessary(@Nullable Object value, @Nullable Class |
T | convertIfNecessary(@Nullable Object value, @Nullable Class |
T | convertIfNecessary(@Nullable Object value, @Nullable Class |
String[] | getAllowedFields() Return the fields that should be allowed for binding. |
BindingResult | getBindingResult() Return the BindingResult instance created by this DataBinder. |
ConversionService | getConversionService() Return the associated ConversionService, if any. |
String | getObjectName() Return the name of the bound object. |
Object | getTarget() Return the wrapped target object. |
Validator | getValidator() Return the primary Validator to apply after each binding step, if any. |
void | initDirectFieldAccess() Initialize direct field access for this DataBinder, as alternative to the default bean property access. |
void | registerCustomEditor(Class> requiredType, PropertyEditor propertyEditor) |
void | registerCustomEditor(@Nullable Class> requiredType, @Nullable String field, PropertyEditor propertyEditor) |
void | setAllowedFields(@Nullable String... allowedFields) Register fields that should be allowed for binding. |
void | setAutoGrowNestedPaths(boolean autoGrowNestedPaths) Set whether this binder should attempt to "auto-grow" a nested path that contains a null value. |
void | setConversionService(@Nullable ConversionService conversionService) Specify a Spring 3.0 ConversionService to use for converting property values, as an alternative to JavaBeans PropertyEditors. |
void | setIgnoreInvalidFields(boolean ignoreInvalidFields) Set whether to ignore invalid fields, that is, whether to ignore bind parameters that have corresponding fields in the target object which are not accessible (for example because of null values in the nested path). |
void | setIgnoreUnknownFields(boolean ignoreUnknownFields) Set whether to ignore unknown fields, that is, whether to ignore bind parameters that do not have corresponding fields in the target object. |
void | setMessageCodesResolver(@Nullable MessageCodesResolver messageCodesResolver) Set the strategy to use for resolving errors into message codes. |
void | setRequiredFields(@Nullable String... requiredFields) Register fields that are required for each binding process. |
void | setValidator(@Nullable Validator validator) Set the Validator to apply after each binding step. |
void | validate() Invoke the specified Validators, if any. |