javax.faces.component
Class TestInputValidator

java.lang.Object
  extended by javax.faces.component.TestInputValidator
All Implemented Interfaces:
java.util.EventListener, Validator

public class TestInputValidator
extends java.lang.Object
implements Validator

Test implementation of Validator.


Field Summary
protected  java.lang.String validatorId
           
 
Fields inherited from interface javax.faces.validator.Validator
NOT_IN_RANGE_MESSAGE_ID
 
Constructor Summary
TestInputValidator(java.lang.String validatorId)
           
 
Method Summary
static java.lang.String trace()
           
static void trace(java.lang.String text)
           
 void validate(FacesContext context, UIComponent component, java.lang.Object value)
          Perform the correctness checks implemented by this Validator against the specified UIComponent.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

validatorId

protected java.lang.String validatorId
Constructor Detail

TestInputValidator

public TestInputValidator(java.lang.String validatorId)
Method Detail

validate

public void validate(FacesContext context,
                     UIComponent component,
                     java.lang.Object value)
Description copied from interface: Validator

Perform the correctness checks implemented by this Validator against the specified UIComponent. If any violations are found, a ValidatorException will be thrown containing the FacesMessage describing the failure.

For a validator to be fully compliant with Version 2 and later of the specification, it must not fail validation on null or empty values unless it is specifically intended to address null or empty values. An application-wide <context-param> is provided to allow validators designed for JSF 1.2 to work with JSF 2 and later. The javax.faces.VALIDATE_EMPTY_FIELDS <context-param> must be set to false to enable this backwards compatibility behavior.

Specified by:
validate in interface Validator
Parameters:
context - FacesContext for the request we are processing
component - UIComponent we are checking for correctness
value - the value to validate

trace

public static void trace(java.lang.String text)

trace

public static java.lang.String trace()


Copyright 2002-2011 Oracle America Inc, Inc. All Rights Reserved.