public class DirectFieldBindingResult extends AbstractPropertyBindingResult
This implementation just supports fields in the actual target object. It is not able to traverse nested fields.
DataBinder.getBindingResult()
,
DataBinder.initDirectFieldAccess()
,
BeanPropertyBindingResult
,
Serialized FormModifier and Type | Field and Description |
---|---|
private ConfigurablePropertyAccessor |
directFieldAccessor |
private java.lang.Object |
target |
MODEL_KEY_PREFIX
NESTED_PATH_SEPARATOR
Constructor and Description |
---|
DirectFieldBindingResult(java.lang.Object target,
java.lang.String objectName)
Create a new DirectFieldBindingResult instance.
|
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.
|
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
private final java.lang.Object target
private transient ConfigurablePropertyAccessor directFieldAccessor
public DirectFieldBindingResult(java.lang.Object target, java.lang.String objectName)
target
- the target object to bind ontoobjectName
- the name of the target objectpublic final java.lang.Object getTarget()
AbstractBindingResult
getTarget
in interface BindingResult
getTarget
in class AbstractBindingResult
public final ConfigurablePropertyAccessor getPropertyAccessor()
getPropertyAccessor
in class AbstractPropertyBindingResult
createDirectFieldAccessor()
protected ConfigurablePropertyAccessor createDirectFieldAccessor()
getTarget()