Save This Page
Home » xwork-2.1.1-src » com.opensymphony.xwork2.validator.validators » [javadoc | source]
com.opensymphony.xwork2.validator.validators
public class: FieldExpressionValidator [javadoc | source]
java.lang.Object
   com.opensymphony.xwork2.validator.validators.ValidatorSupport
      com.opensymphony.xwork2.validator.validators.FieldValidatorSupport
         com.opensymphony.xwork2.validator.validators.FieldExpressionValidator

All Implemented Interfaces:
    FieldValidator, ShortCircuitableValidator, Validator

Validates a field using an OGNL expression.


<!-- Plain Validator Syntax -->
<validators>
<!-- Plain Validator Syntax -->
<validator type="fieldexpression">
<param name="fieldName">myField</param>
<param name="expression"><![CDATA[#myCreditLimit > #myGirfriendCreditLimit]]></param>
<message>My credit limit should be MORE than my girlfriend</message>
<validator>

<!-- Field Validator Syntax -->
<field name="myField">
<field-validator type="fieldexpression">
<param name="expression"><![CDATA[#myCreditLimit > #myGirfriendCreditLimit]]></param>
<message>My credit limit should be MORE than my girlfriend</message>
</field-validator>
</field>

</vaidators>

Fields inherited from com.opensymphony.xwork2.validator.validators.ValidatorSupport:
log,  defaultMessage,  messageKey
Method from com.opensymphony.xwork2.validator.validators.FieldExpressionValidator Summary:
getExpression,   setExpression,   validate
Methods from com.opensymphony.xwork2.validator.validators.FieldValidatorSupport:
getFieldName,   getValidatorType,   setFieldName,   setValidatorType
Methods from com.opensymphony.xwork2.validator.validators.ValidatorSupport:
addActionError,   addFieldError,   conditionalParse,   getDefaultMessage,   getFieldValue,   getMessage,   getMessageKey,   getParse,   getValidatorContext,   getValidatorType,   isShortCircuit,   setDefaultMessage,   setMessageKey,   setParse,   setShortCircuit,   setValidatorContext,   setValidatorType,   setValueStack
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from com.opensymphony.xwork2.validator.validators.FieldExpressionValidator Detail:
 public String getExpression() 
 public  void setExpression(String expression) 
 public  void validate(Object object) throws ValidationException