net.sf.tacos.form.validator
Class RealNumberValidator

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

public class RealNumberValidator
extends org.apache.tapestry.form.validator.BaseValidator

A validator that ensures the input values are real numbers.

Author:
jkuhnert

Constructor Summary
RealNumberValidator()
          No args constructor.
RealNumberValidator(String initializer)
          Initialized constructor, class takes no parameters so anything passed in will be ignored.
 
Method Summary
protected  String buildMessage(org.apache.tapestry.form.ValidationMessages messages, org.apache.tapestry.form.IFormComponent field)
          Builds a validation message corresponding to this classes error display of invalid numbers.
 void renderContribution(org.apache.tapestry.IMarkupWriter writer, org.apache.tapestry.IRequestCycle cycle, org.apache.tapestry.form.FormComponentContributorContext context, org.apache.tapestry.form.IFormComponent field)
          
 void validate(org.apache.tapestry.form.IFormComponent field, org.apache.tapestry.form.ValidationMessages messages, Object object)
          
 
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
 

Constructor Detail

RealNumberValidator

public RealNumberValidator()
No args constructor.


RealNumberValidator

public RealNumberValidator(String initializer)
Initialized constructor, class takes no parameters so anything passed in will be ignored.

Parameters:
initializer -
Method Detail

validate

public void validate(org.apache.tapestry.form.IFormComponent field,
                     org.apache.tapestry.form.ValidationMessages messages,
                     Object object)
              throws org.apache.tapestry.valid.ValidatorException

Throws:
org.apache.tapestry.valid.ValidatorException

buildMessage

protected String buildMessage(org.apache.tapestry.form.ValidationMessages messages,
                              org.apache.tapestry.form.IFormComponent field)
Builds a validation message corresponding to this classes error display of invalid numbers.

Parameters:
messages -
field -
Returns:
The message

renderContribution

public void renderContribution(org.apache.tapestry.IMarkupWriter writer,
                               org.apache.tapestry.IRequestCycle cycle,
                               org.apache.tapestry.form.FormComponentContributorContext context,
                               org.apache.tapestry.form.IFormComponent field)

Specified by:
renderContribution in interface org.apache.tapestry.form.FormComponentContributor
Overrides:
renderContribution in class org.apache.tapestry.form.validator.BaseValidator