public class BeanPropertyBindingResult extends AbstractPropertyBindingResult implements java.io.Serializable
Errors
and BindingResult
interfaces, for the registration and evaluation of binding errors on
JavaBean objects.
Performs standard JavaBean property access, also supporting nested
properties. Normally, application code will work with the
Errors
interface or the BindingResult
interface.
A DataBinder
returns its BindingResult
via
DataBinder.getBindingResult()
.
DataBinder.getBindingResult()
,
DataBinder.initBeanPropertyAccess()
,
DirectFieldBindingResult
,
Serialized FormModifier and Type | Field and Description |
---|---|
private int |
autoGrowCollectionLimit |
private boolean |
autoGrowNestedPaths |
private BeanWrapper |
beanWrapper |
private java.lang.Object |
target |
MODEL_KEY_PREFIX
NESTED_PATH_SEPARATOR
Constructor and Description |
---|
BeanPropertyBindingResult(java.lang.Object target,
java.lang.String objectName)
Creates a new instance of the
BeanPropertyBindingResult class. |
BeanPropertyBindingResult(java.lang.Object target,
java.lang.String objectName,
boolean autoGrowNestedPaths,
int autoGrowCollectionLimit)
Creates a new instance of the
BeanPropertyBindingResult class. |
Modifier and Type | Method and Description |
---|---|
protected BeanWrapper |
createBeanWrapper()
Create a new
BeanWrapper for the underlying target object. |
ConfigurablePropertyAccessor |
getPropertyAccessor()
Returns the
BeanWrapper that this instance uses. |
java.lang.Object |
getTarget()
Return the wrapped target object.
|
canonicalFieldName, findEditor, formatFieldValue, getActualFieldValue, getCustomEditor, getFieldType, getPropertyEditorRegistry, initConversion
addAllErrors, addError, equals, getAllErrors, getErrorCount, getFieldError, getFieldError, getFieldErrors, getFieldErrors, getFieldValue, getGlobalError, getGlobalErrors, getMessageCodesResolver, getModel, getObjectName, getRawFieldValue, getSuppressedFields, hasErrors, hashCode, recordFieldValue, recordSuppressedField, reject, rejectValue, resolveMessageCodes, resolveMessageCodes, setMessageCodesResolver
doSetNestedPath, fixedField, getFieldErrorCount, getFieldErrorCount, getGlobalErrorCount, getNestedPath, hasFieldErrors, hasFieldErrors, hasGlobalErrors, isMatchingFieldError, popNestedPath, pushNestedPath, reject, reject, rejectValue, rejectValue, setNestedPath, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getFieldErrorCount, getFieldErrorCount, getGlobalErrorCount, getNestedPath, hasFieldErrors, hasFieldErrors, hasGlobalErrors, popNestedPath, pushNestedPath, reject, reject, rejectValue, rejectValue, setNestedPath
@Nullable private final java.lang.Object target
private final boolean autoGrowNestedPaths
private final int autoGrowCollectionLimit
@Nullable private transient BeanWrapper beanWrapper
public BeanPropertyBindingResult(@Nullable java.lang.Object target, java.lang.String objectName)
BeanPropertyBindingResult
class.target
- the target bean to bind ontoobjectName
- the name of the target objectpublic BeanPropertyBindingResult(@Nullable java.lang.Object target, java.lang.String objectName, boolean autoGrowNestedPaths, int autoGrowCollectionLimit)
BeanPropertyBindingResult
class.target
- the target bean to bind ontoobjectName
- the name of the target objectautoGrowNestedPaths
- whether to "auto-grow" a nested path that contains a null valueautoGrowCollectionLimit
- the limit for array and collection auto-growing@Nullable public final java.lang.Object getTarget()
AbstractBindingResult
getTarget
in interface BindingResult
getTarget
in class AbstractBindingResult
public final ConfigurablePropertyAccessor getPropertyAccessor()
BeanWrapper
that this instance uses.
Creates a new one if none existed before.getPropertyAccessor
in class AbstractPropertyBindingResult
createBeanWrapper()
protected BeanWrapper createBeanWrapper()
BeanWrapper
for the underlying target object.getTarget()