com.opensymphony.xwork2.validator
Class AnnotationActionValidatorManager.InternalValidatorContextWrapper

java.lang.Object
  extended by com.opensymphony.xwork2.validator.AnnotationActionValidatorManager.InternalValidatorContextWrapper
Enclosing class:
AnnotationActionValidatorManager

protected class AnnotationActionValidatorManager.InternalValidatorContextWrapper
extends Object

An ValidatorContext wrapper that returns the full field name com.opensymphony.xwork2.validator.AbstractActionValidatorManager.InternalValidatorContextWrapper#getFullFieldName(String) by consulting it's parent if its an VisitorFieldValidator.AppendingValidatorContext.

Eg. if we have nested Visitor AddressVisitor nested inside PersonVisitor, when using the normal #getFullFieldName, we will get "address.somefield", we lost the parent, with this wrapper, we will get "person.address.somefield". This is so that the key is used to register errors, so that we don't screw up short-curcuit feature when using nested visitor. See XW-571 (nested visitor validators break short-circuit functionality) at http://jira.opensymphony.com/browse/XW-571


Field Summary
private  ValidatorContext validatorContext
           
 
Constructor Summary
AnnotationActionValidatorManager.InternalValidatorContextWrapper(ValidatorContext validatorContext)
           
 
Method Summary
 String getFullFieldName(String field)
          Get the full field name by consulting the parent, so that when we are using nested visitors ( visitor nested inside visitor etc.) we still get the full field name including its parents.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

validatorContext

private ValidatorContext validatorContext
Constructor Detail

AnnotationActionValidatorManager.InternalValidatorContextWrapper

AnnotationActionValidatorManager.InternalValidatorContextWrapper(ValidatorContext validatorContext)
Method Detail

getFullFieldName

public String getFullFieldName(String field)
Get the full field name by consulting the parent, so that when we are using nested visitors ( visitor nested inside visitor etc.) we still get the full field name including its parents. See XW-571 for more details.

Parameters:
field -
Returns:
String


Copyright © 2000-2009 Apache Software Foundation. All Rights Reserved.