net.sf.beanform.validator
Class AbstractNumberValidator

java.lang.Object
  extended by org.apache.tapestry.form.validator.BaseValidator
      extended by net.sf.beanform.validator.AbstractNumberValidator
All Implemented Interfaces:
FormComponentContributor, Validator
Direct Known Subclasses:
NumberValidator, WholeNumberValidator

public abstract class AbstractNumberValidator
extends BaseValidator

Base class for numeric validators.

Author:
Daniel Gredler

Constructor Summary
AbstractNumberValidator()
           
 
Method Summary
protected abstract  String buildMessage(IFormComponent field, Locale locale)
           
protected abstract  void parseNumber(String s)
           
 void validate(IFormComponent field, ValidationMessages messages, Object value)
           
 
Methods inherited from class org.apache.tapestry.form.validator.BaseValidator
getAcceptsNull, getMessage, isRequired, renderContribution, setMessage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractNumberValidator

public AbstractNumberValidator()
Method Detail

validate

public void validate(IFormComponent field,
                     ValidationMessages messages,
                     Object value)
              throws ValidatorException
Throws:
ValidatorException

parseNumber

protected abstract void parseNumber(String s)

buildMessage

protected abstract String buildMessage(IFormComponent field,
                                       Locale locale)


Copyright © 2006 Daniel Gredler. All Rights Reserved.