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 FormMODEL_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, 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
public BeanPropertyBindingResult(java.lang.Object target, java.lang.String objectName)
BeanPropertyBindingResult
class.target
- the target bean to bind ontoobjectName
- the name of the target objectpublic BeanPropertyBindingResult(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-growingpublic 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()