public class BeanPropertyBindingResult extends AbstractPropertyBindingResult implements 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(Object target,
String objectName)
Creates a new instance of the
BeanPropertyBindingResult class. |
BeanPropertyBindingResult(Object target,
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. |
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(Object target, String objectName)
BeanPropertyBindingResult
class.target
- the target bean to bind ontoobjectName
- the name of the target objectpublic BeanPropertyBindingResult(Object target, 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 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()