com.primix.tapestry.valid
Class BaseValidationDelegate
java.lang.Object
|
+--com.primix.tapestry.valid.BaseValidationDelegate
- All Implemented Interfaces:
- IValidationDelegate
- Direct Known Subclasses:
- SimpleValidationDelegate, ValidationDelegate
- public class BaseValidationDelegate
- extends java.lang.Object
- implements IValidationDelegate
Base implementation of the IValidationDelegate
interface.
- Version:
- $Id: BaseValidationDelegate.java,v 1.4 2001/08/23 20:19:32 hship Exp $
- Author:
- Howard Ship
Method Summary |
void |
invalidField(IValidatingTextField field,
ValidationConstraint constraint,
java.lang.String defaultErrorMessage)
Does nothing! Subclasses will almost always want to override this
to capture the defaultErrorMessage and store it where
it can be displayed when the page is rendered. |
void |
writeAttributes(IValidatingTextField field,
IResponseWriter writer,
IRequestCycle cycle)
Does nothing. |
void |
writeErrorPrefix(IValidatingTextField field,
IResponseWriter writer,
IRequestCycle cycle)
Does nothing, rarely overriden. |
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 |
BaseValidationDelegate
public BaseValidationDelegate()
invalidField
public void invalidField(IValidatingTextField field,
ValidationConstraint constraint,
java.lang.String defaultErrorMessage)
- Does nothing! Subclasses will almost always want to override this
to capture the defaultErrorMessage and store it where
it can be displayed when the page is rendered.
- Specified by:
invalidField
in interface IValidationDelegate
- 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.
writeAttributes
public void writeAttributes(IValidatingTextField field,
IResponseWriter writer,
IRequestCycle cycle)
throws RequestCycleException
- Does nothing. Subclasses may want to write the CSS "class"
attribute, or otherwise change the appearance of
the field.
- Specified by:
writeAttributes
in interface IValidationDelegate
- Since:
- 1.0.5
writeErrorPrefix
public void writeErrorPrefix(IValidatingTextField field,
IResponseWriter writer,
IRequestCycle cycle)
- Does nothing, rarely overriden.
- Specified by:
writeErrorPrefix
in interface IValidationDelegate
writeErrorSuffix
public void writeErrorSuffix(IValidatingTextField field,
IResponseWriter writer,
IRequestCycle cycle)
- Writes out two red asterisks, as <font color="red">**</font>.
- Specified by:
writeErrorSuffix
in interface IValidationDelegate
writeLabelPrefix
public void writeLabelPrefix(IValidatingTextField field,
IResponseWriter writer,
IRequestCycle cycle)
throws RequestCycleException
- Writes the label in red if the field is in error.
- Specified by:
writeLabelPrefix
in interface IValidationDelegate
writeLabelSuffix
public void writeLabelSuffix(IValidatingTextField field,
IResponseWriter writer,
IRequestCycle cycle)
throws RequestCycleException
- Closes the <font> element,started by
writeLabelPrefix(IValidatingTextField,IResponseWriter,IRequestCycle)
,
if the field is in error.
- Specified by:
writeLabelSuffix
in interface IValidationDelegate