com.opensymphony.xwork2.validator
Class DefaultActionValidatorManager.InternalValidatorContextWrapper

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

protected class DefaultActionValidatorManager.InternalValidatorContextWrapper
extends Object

An ValidatorContext wrapper that returns the full field name 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


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
 

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 - The field name
Returns:
String


Copyright © 2009 OpenSymphony. All Rights Reserved.