com.primix.vlib
Class SimpleValidationDelegate
java.lang.Object
|
+--com.primix.tapestry.valid.BaseValidationDelegate
|
+--com.primix.vlib.SimpleValidationDelegate
- All Implemented Interfaces:
- IValidationDelegate
- public class SimpleValidationDelegate
- extends BaseValidationDelegate
Implementation of IValidationDelegate
that
works with pages that implements IErrorProperty
.
- Version:
- $Id: SimpleValidationDelegate.java,v 1.5 2001/09/10 18:25:14 hship Exp $
- Author:
- Howard Ship
Method Summary |
void |
invalidField(IValidatingTextField field,
ValidationConstraint constraint,
java.lang.String defaultErrorMessage)
Checks to see if the page already has an error; if not,
invokes setError() to update it. |
void |
writeErrorSuffix(IValidatingTextField field,
IResponseWriter writer,
IRequestCycle cycle)
Writes out two red asterisks, as <font color="red">**</font>. |
void |
writeLabelPrefix(IValidatingTextField field,
IResponseWriter writer,
IRequestCycle cycle)
Writes the label in red if the field is in error. |
void |
writeLabelSuffix(IValidatingTextField field,
IResponseWriter writer,
IRequestCycle cycle)
Closes the <font> element,started by
writeLabelPrefix(IValidatingTextField,IResponseWriter,IRequestCycle) ,
if the field is in error. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SimpleValidationDelegate
public SimpleValidationDelegate(IErrorProperty page)
invalidField
public void invalidField(IValidatingTextField field,
ValidationConstraint constraint,
java.lang.String defaultErrorMessage)
- Checks to see if the page already has an error; if not,
invokes
setError()
to update it.
- Overrides:
invalidField
in class BaseValidationDelegate
- Following copied from interface:
com.primix.tapestry.valid.IValidationDelegate
- Parameters:
field
- the field to which the update applies to.constraint
- the ValidationConstraint
which was violated.defaultErrorMessage
- a default, localized, error message.
writeLabelPrefix
public void writeLabelPrefix(IValidatingTextField field,
IResponseWriter writer,
IRequestCycle cycle)
- Description copied from class:
BaseValidationDelegate
- Writes the label in red if the field is in error.
- Overrides:
writeLabelPrefix
in class BaseValidationDelegate
writeLabelSuffix
public void writeLabelSuffix(IValidatingTextField field,
IResponseWriter writer,
IRequestCycle cycle)
- Description copied from class:
BaseValidationDelegate
- Closes the <font> element,started by
BaseValidationDelegate.writeLabelPrefix(IValidatingTextField,IResponseWriter,IRequestCycle)
,
if the field is in error.
- Overrides:
writeLabelSuffix
in class BaseValidationDelegate
writeErrorSuffix
public void writeErrorSuffix(IValidatingTextField field,
IResponseWriter writer,
IRequestCycle cycle)
- Description copied from class:
BaseValidationDelegate
- Writes out two red asterisks, as <font color="red">**</font>.
- Overrides:
writeErrorSuffix
in class BaseValidationDelegate