org.springmodules.validation.commons
Class ConfigurablePageBeanValidator

java.lang.Object
  extended by org.springmodules.validation.commons.AbstractBeanValidator
      extended by org.springmodules.validation.commons.AbstractPageBeanValidator
          extended by org.springmodules.validation.commons.ConfigurablePageBeanValidator
All Implemented Interfaces:
Validator, PageAware

public class ConfigurablePageBeanValidator
extends AbstractPageBeanValidator

A bean validator that is aware of the page attribute in the form configuration. This may be useful for partial bean validation (that is, selected properties of the bean) needed for example in web wizard controllers.

Author:
Uri Boness

Constructor Summary
ConfigurablePageBeanValidator()
          Default constructor (javabean support)
ConfigurablePageBeanValidator(int page)
          Constructs a new DefaultPageBeanValidator with a given page to validate.
 
Method Summary
protected  String getFormName(Class cls)
          If useFullyQualifiedClassName is false (default value), this function returns a string containing the uncapitalized, short name for the given class (e.g. myBean for the class com.domain.test.MyBean).
 void setFormName(String formName)
           
 
Methods inherited from class org.springmodules.validation.commons.AbstractPageBeanValidator
cleanupValidator, getPage, initValidator, setPage
 
Methods inherited from class org.springmodules.validation.commons.AbstractBeanValidator
getLocale, setValidatorFactory, supports, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConfigurablePageBeanValidator

public ConfigurablePageBeanValidator()
Default constructor (javabean support)


ConfigurablePageBeanValidator

public ConfigurablePageBeanValidator(int page)
Constructs a new DefaultPageBeanValidator with a given page to validate.

Parameters:
page - The page that should be validated by this validator.
Method Detail

getFormName

protected String getFormName(Class cls)
If useFullyQualifiedClassName is false (default value), this function returns a string containing the uncapitalized, short name for the given class (e.g. myBean for the class com.domain.test.MyBean). Otherwise, it returns the value returned by Class.getName().

Specified by:
getFormName in class AbstractBeanValidator
Parameters:
cls - Class of the bean to be validated.
Returns:
the bean name.

setFormName

public void setFormName(String formName)


Copyright © 2009. All Rights Reserved.