public class DirectFieldBindingResult extends AbstractPropertyBindingResult
Since Spring 4.1 this implementation is able to traverse nested fields.
DataBinder.getBindingResult()
,
DataBinder.initDirectFieldAccess()
,
BeanPropertyBindingResult
,
Serialized FormMODEL_KEY_PREFIX
NESTED_PATH_SEPARATOR
Constructor and Description |
---|
DirectFieldBindingResult(Object target,
String objectName)
Create a new
DirectFieldBindingResult for the given target. |
DirectFieldBindingResult(Object target,
String objectName,
boolean autoGrowNestedPaths)
Create a new
DirectFieldBindingResult for the given target. |
Modifier and Type | Method and Description |
---|---|
protected ConfigurablePropertyAccessor |
createDirectFieldAccessor()
Create a new DirectFieldAccessor for the underlying target object.
|
ConfigurablePropertyAccessor |
getPropertyAccessor()
Returns the DirectFieldAccessor 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, 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
public DirectFieldBindingResult(@Nullable Object target, String objectName)
DirectFieldBindingResult
for the given target.target
- the target object to bind ontoobjectName
- the name of the target objectpublic DirectFieldBindingResult(@Nullable Object target, String objectName, boolean autoGrowNestedPaths)
DirectFieldBindingResult
for the given target.target
- the target object to bind ontoobjectName
- the name of the target objectautoGrowNestedPaths
- whether to "auto-grow" a nested path that contains a null value@Nullable public final Object getTarget()
AbstractBindingResult
getTarget
in interface BindingResult
getTarget
in class AbstractBindingResult
public final ConfigurablePropertyAccessor getPropertyAccessor()
getPropertyAccessor
in class AbstractPropertyBindingResult
createDirectFieldAccessor()
protected ConfigurablePropertyAccessor createDirectFieldAccessor()
getTarget()