类 BeanPropertyBindingResult
- java.lang.Object
- org.springframework.validation.AbstractErrors
- org.springframework.validation.AbstractBindingResult
- org.springframework.validation.AbstractPropertyBindingResult
- org.springframework.validation.BeanPropertyBindingResult
- 所有已实现的接口:
Serializable
,BindingResult
,Errors
public class BeanPropertyBindingResult extends AbstractPropertyBindingResult implements Serializable
Default implementation of theErrors
andBindingResult
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 theBindingResult
interface. ADataBinder
returns itsBindingResult
viaDataBinder.getBindingResult()
.- 从以下版本开始:
- 2.0
- 作者:
- Juergen Hoeller
- 另请参阅:
DataBinder.getBindingResult()
,DataBinder.initBeanPropertyAccess()
,DirectFieldBindingResult
, 序列化表格
字段概要
从接口继承的字段 org.springframework.validation.BindingResult
MODEL_KEY_PREFIX
从接口继承的字段 org.springframework.validation.Errors
NESTED_PATH_SEPARATOR
构造器概要
构造器 构造器 说明 BeanPropertyBindingResult(Object target, String objectName)
Creates a new instance of theBeanPropertyBindingResult
class.BeanPropertyBindingResult(Object target, String objectName, boolean autoGrowNestedPaths, int autoGrowCollectionLimit)
Creates a new instance of theBeanPropertyBindingResult
class.
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 protected BeanWrapper
createBeanWrapper()
Create a newBeanWrapper
for the underlying target object.ConfigurablePropertyAccessor
getPropertyAccessor()
Returns theBeanWrapper
that this instance uses.Object
getTarget()
Return the wrapped target object.从类继承的方法 org.springframework.validation.AbstractPropertyBindingResult
canonicalFieldName, findEditor, formatFieldValue, getActualFieldValue, getCustomEditor, getFieldType, getPropertyEditorRegistry, initConversion
从类继承的方法 org.springframework.validation.AbstractBindingResult
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
从类继承的方法 org.springframework.validation.AbstractErrors
doSetNestedPath, fixedField, getFieldErrorCount, getFieldErrorCount, getGlobalErrorCount, getNestedPath, hasFieldErrors, hasFieldErrors, hasGlobalErrors, isMatchingFieldError, popNestedPath, pushNestedPath, reject, reject, rejectValue, rejectValue, setNestedPath, toString
从接口继承的方法 org.springframework.validation.Errors
getFieldErrorCount, getFieldErrorCount, getGlobalErrorCount, getNestedPath, hasFieldErrors, hasFieldErrors, hasGlobalErrors, popNestedPath, pushNestedPath, reject, reject, rejectValue, rejectValue, setNestedPath
构造器详细资料
BeanPropertyBindingResult
public BeanPropertyBindingResult(Object target, String objectName)
Creates a new instance of theBeanPropertyBindingResult
class.- 参数:
target
- the target bean to bind ontoobjectName
- the name of the target object
BeanPropertyBindingResult
public BeanPropertyBindingResult(Object target, String objectName, boolean autoGrowNestedPaths, int autoGrowCollectionLimit)
Creates a new instance of theBeanPropertyBindingResult
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
方法详细资料
getTarget
public final Object getTarget()
从类复制的说明:AbstractBindingResult
Return the wrapped target object.- 指定者:
getTarget
在接口中BindingResult
- 指定者:
getTarget
在类中AbstractBindingResult
getPropertyAccessor
public final ConfigurablePropertyAccessor getPropertyAccessor()
Returns theBeanWrapper
that this instance uses. Creates a new one if none existed before.
createBeanWrapper
protected BeanWrapper createBeanWrapper()
Create a newBeanWrapper
for the underlying target object.- 另请参阅:
getTarget()