站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > Spring Framework 2.1.0 API 文档英文版

BeanPropertyBindingResult (Spring Framework API 2.1) - Spring Framework 2.1.0 API 文档英文版


The Spring Framework

org.springframework.validation
Class BeanPropertyBindingResult

java.lang.Object
  extended by org.springframework.validation.AbstractBindingResult
      extended by org.springframework.validation.AbstractPropertyBindingResult
          extended by org.springframework.validation.BeanPropertyBindingResult
All Implemented Interfaces:
Serializable, BindingResult, Errors

public class BeanPropertyBindingResult
extends AbstractPropertyBindingResult
implements Serializable

Default implementation of the 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().

Since:
2.0
Author:
Juergen Hoeller
See Also:
DataBinder.getBindingResult(), DataBinder.initBeanPropertyAccess(), DirectFieldBindingResult, Serialized Form

Field Summary
 
Fields inherited from interface org.springframework.validation.BindingResult
MODEL_KEY_PREFIX
 
Fields inherited from interface org.springframework.validation.Errors
NESTED_PATH_SEPARATOR
 
Constructor Summary
BeanPropertyBindingResult(Object target, String objectName)
          Creates a new instance of the BeanPropertyBindingResult class.
 
Method Summary
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.
 
Methods inherited from class org.springframework.validation.AbstractPropertyBindingResult
canonicalFieldName, formatFieldValue, getActualFieldValue, getCustomEditor, getFieldType, getPropertyEditorRegistry
 
Methods inherited from class org.springframework.validation.AbstractBindingResult
addAllErrors, addError, doSetNestedPath, equals, fixedField, getAllErrors, getErrorCount, getFieldError, getFieldError, getFieldErrorCount, getFieldErrorCount, getFieldErrors, getFieldErrors, getFieldValue, getGlobalError, getGlobalErrorCount, getGlobalErrors, getMessageCodesResolver, getModel, getNestedPath, getObjectName, getSuppressedFields, hasErrors, hasFieldErrors, hasFieldErrors, hasGlobalErrors, hashCode, isMatchingFieldError, popNestedPath, pushNestedPath, recordSuppressedField, reject, reject, reject, rejectValue, rejectValue, rejectValue, resolveMessageCodes, resolveMessageCodes, setMessageCodesResolver, setNestedPath, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BeanPropertyBindingResult

public BeanPropertyBindingResult(Object target,
                                 String objectName)
Creates a new instance of the BeanPropertyBindingResult class.

Parameters:
target - the target bean to bind onto
objectName - the name of the target object
Throws:
IllegalArgumentException - if the supplied target is null
Method Detail

getTarget

public final Object getTarget()
Description copied from class: AbstractBindingResult
Return the wrapped target object.

Specified by:
getTarget in interface BindingResult
Specified by:
getTarget in class AbstractBindingResult

getPropertyAccessor

public final ConfigurablePropertyAccessor getPropertyAccessor()
Returns the BeanWrapper that this instance uses. Creates a new one if none existed before.

Specified by:
getPropertyAccessor in class AbstractPropertyBindingResult
See Also:
createBeanWrapper()

createBeanWrapper

protected BeanWrapper createBeanWrapper()
Create a new BeanWrapper for the underlying target object.

See Also:
getTarget()

The Spring Framework

Copyright © 2002-2007 The Spring Framework.