org.apache.struts.validator.validwhen
Class ValidWhen
java.lang.Object
|
+--org.apache.struts.validator.validwhen.ValidWhen
- public class ValidWhen
- extends java.lang.Object
This class contains the validwhen validation that is used in the
validator-rules.xml file.
- Since:
- Struts 1.2
Field Summary |
private static org.apache.commons.logging.Log |
log
Commons Logging instance. |
Method Summary |
private static boolean |
isString(java.lang.Object obj)
Returns true if obj is null or a String. |
static boolean |
validateValidWhen(java.lang.Object bean,
org.apache.commons.validator.ValidatorAction va,
org.apache.commons.validator.Field field,
ActionMessages errors,
org.apache.commons.validator.Validator validator,
javax.servlet.http.HttpServletRequest request)
Checks if the field matches the boolean expression specified in
test parameter. |
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
log
private static final org.apache.commons.logging.Log log
- Commons Logging instance.
ValidWhen
public ValidWhen()
isString
private static boolean isString(java.lang.Object obj)
- Returns true if
obj
is null or a String.
validateValidWhen
public static boolean validateValidWhen(java.lang.Object bean,
org.apache.commons.validator.ValidatorAction va,
org.apache.commons.validator.Field field,
ActionMessages errors,
org.apache.commons.validator.Validator validator,
javax.servlet.http.HttpServletRequest request)
- Checks if the field matches the boolean expression specified in
test
parameter.
- Parameters:
bean
- The bean validation is being performed on.va
- The ValidatorAction
that is currently being
performed.field
- The Field
object associated with the current
field being validated.errors
- The ActionMessages
object to add errors to if any
validation errors occur.request
- Current request object.- Returns:
true
if meets stated requirements,
false
otherwise.
Copyright © 2000-2005 - The Apache Software Foundation