net.sf.springlayout.web.validator
Class IntegerValidator

java.lang.Object
  extended by net.sf.springlayout.web.validator.AbstractValidationRule
      extended by net.sf.springlayout.web.validator.IntegerValidator
All Implemented Interfaces:
ValidationRule

public class IntegerValidator
extends AbstractValidationRule

Provides type validation for integers

Author:
Rob Monie, Adam Boas

Constructor Summary
IntegerValidator()
           
 
Method Summary
 java.lang.String getJavascript()
          Get the javascript used to validate this rule
 boolean isValid(java.lang.Object obj, java.lang.String fieldKey)
          As with the validate method, if it gets this far then the field value must be valid.
 void validate(javax.servlet.http.HttpServletRequest request, java.lang.Object obj, org.springframework.validation.Errors errors, java.lang.String fieldKey)
          This method is not implemented as valdiating of types is taken care of through the binding process.
 
Methods inherited from class net.sf.springlayout.web.validator.AbstractValidationRule
conditionallyValidate, getCondition, getConditionalJavascript, getFieldValue, setCondition
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IntegerValidator

public IntegerValidator()
Method Detail

validate

public void validate(javax.servlet.http.HttpServletRequest request,
                     java.lang.Object obj,
                     org.springframework.validation.Errors errors,
                     java.lang.String fieldKey)
This method is not implemented as valdiating of types is taken care of through the binding process. If the value of this field is not of type Integer then it will never get here.

Specified by:
validate in class AbstractValidationRule
See Also:
net.sf.springlayout.web.validator.ValidationRule#validate(javax.servlet.http.HttpServletRequest, java.lang.Object, org.springframework.validation.Errors, java.lang.String)

isValid

public boolean isValid(java.lang.Object obj,
                       java.lang.String fieldKey)
As with the validate method, if it gets this far then the field value must be valid.

Returns:
See Also:
ValidationRule.isValid(java.lang.Object, java.lang.String)

getJavascript

public java.lang.String getJavascript()
Description copied from class: AbstractValidationRule
Get the javascript used to validate this rule

Specified by:
getJavascript in class AbstractValidationRule
Returns:


Copyright © 2005-2007 Spring Layout Team. All Rights Reserved.