net.sf.beanform.validator
Class StringMax

java.lang.Object
  extended by org.apache.tapestry.form.validator.BaseValidator
      extended by org.apache.tapestry.form.validator.Max
          extended by net.sf.beanform.validator.StringMax
All Implemented Interfaces:
FormComponentContributor, Validator

public class StringMax
extends Max

Subclass of the Max validator that doesn't barf all over the place if it's handed a string instead of a number. Apparently Tapestry normally does some automatic type conversions depending on a value's setter and getter, but our setters and getters are for generic objects.

Author:
Daniel Gredler

Field Summary
static String NAME
           
 
Constructor Summary
StringMax()
           
StringMax(String initializer)
           
 
Method Summary
 void setSmax(double smax)
           
 void validate(IFormComponent field, ValidationMessages messages, Object object)
           
 
Methods inherited from class org.apache.tapestry.form.validator.Max
renderContribution, setMax
 
Methods inherited from class org.apache.tapestry.form.validator.BaseValidator
getAcceptsNull, getMessage, isRequired, setMessage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NAME

public static final String NAME
See Also:
Constant Field Values
Constructor Detail

StringMax

public StringMax()

StringMax

public StringMax(String initializer)
Method Detail

validate

public void validate(IFormComponent field,
                     ValidationMessages messages,
                     Object object)
              throws ValidatorException
Specified by:
validate in interface Validator
Overrides:
validate in class Max
Throws:
ValidatorException

setSmax

public void setSmax(double smax)


Copyright © 2006 Daniel Gredler. All Rights Reserved.