org.apache.tapestry.form
Class MockDelegate
java.lang.Object
org.apache.tapestry.form.MockDelegate
- All Implemented Interfaces:
- Serializable, IValidationDelegate
public class MockDelegate
- extends Object
- implements IValidationDelegate
Mock implementation of IValidationDelegate
used for testing
(particularily, to test how the delegate decorates fields and field labels.
- Since:
- 4.0
- Author:
- Howard M. Lewis Ship
- See Also:
- Serialized Form
Method Summary |
void |
afterLabelText(IMarkupWriter writer,
IRequestCycle cycle,
IFormComponent component)
|
void |
beforeLabelText(IMarkupWriter writer,
IRequestCycle cycle,
IFormComponent component)
|
void |
clear()
|
void |
clearErrors()
|
IFieldTracking |
getCurrentFieldTracking()
|
List |
getErrorRenderers()
|
String |
getFieldInputValue()
|
List |
getFieldTracking()
|
String |
getFocusField()
|
IFormComponent |
getFormComponent()
|
boolean |
getHasErrors()
|
boolean |
isInError()
|
void |
record(IFormComponent field,
String message)
|
void |
record(IRender errorRenderer,
ValidationConstraint constraint)
|
void |
record(String message,
ValidationConstraint constraint)
|
void |
record(ValidatorException ex)
|
void |
recordFieldInputValue(String input)
|
void |
registerForFocus(IFormComponent field,
int priority)
|
void |
reset()
|
void |
setFormComponent(IFormComponent component)
|
void |
writeAttributes(IMarkupWriter writer,
IRequestCycle cycle,
IFormComponent component,
IValidator validator)
|
void |
writeLabelAttributes(IMarkupWriter writer,
IRequestCycle cycle,
IFormComponent component)
|
void |
writeLabelPrefix(IFormComponent component,
IMarkupWriter writer,
IRequestCycle cycle)
|
void |
writeLabelSuffix(IFormComponent component,
IMarkupWriter writer,
IRequestCycle cycle)
|
void |
writePrefix(IMarkupWriter writer,
IRequestCycle cycle,
IFormComponent component,
IValidator validator)
|
void |
writeSuffix(IMarkupWriter writer,
IRequestCycle cycle,
IFormComponent component,
IValidator validator)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MockDelegate
public MockDelegate()
MockDelegate
public MockDelegate(boolean inError)
registerForFocus
public void registerForFocus(IFormComponent field,
int priority)
- Specified by:
registerForFocus
in interface IValidationDelegate
getFormComponent
public IFormComponent getFormComponent()
setFormComponent
public void setFormComponent(IFormComponent component)
- Specified by:
setFormComponent
in interface IValidationDelegate
isInError
public boolean isInError()
- Specified by:
isInError
in interface IValidationDelegate
getFieldInputValue
public String getFieldInputValue()
- Specified by:
getFieldInputValue
in interface IValidationDelegate
getFieldTracking
public List getFieldTracking()
- Specified by:
getFieldTracking
in interface IValidationDelegate
reset
public void reset()
- Specified by:
reset
in interface IValidationDelegate
clear
public void clear()
- Specified by:
clear
in interface IValidationDelegate
recordFieldInputValue
public void recordFieldInputValue(String input)
- Specified by:
recordFieldInputValue
in interface IValidationDelegate
record
public void record(ValidatorException ex)
- Specified by:
record
in interface IValidationDelegate
record
public void record(String message,
ValidationConstraint constraint)
- Specified by:
record
in interface IValidationDelegate
record
public void record(IRender errorRenderer,
ValidationConstraint constraint)
- Specified by:
record
in interface IValidationDelegate
writePrefix
public void writePrefix(IMarkupWriter writer,
IRequestCycle cycle,
IFormComponent component,
IValidator validator)
- Specified by:
writePrefix
in interface IValidationDelegate
writeAttributes
public void writeAttributes(IMarkupWriter writer,
IRequestCycle cycle,
IFormComponent component,
IValidator validator)
- Specified by:
writeAttributes
in interface IValidationDelegate
writeSuffix
public void writeSuffix(IMarkupWriter writer,
IRequestCycle cycle,
IFormComponent component,
IValidator validator)
- Specified by:
writeSuffix
in interface IValidationDelegate
beforeLabelText
public void beforeLabelText(IMarkupWriter writer,
IRequestCycle cycle,
IFormComponent component)
- Specified by:
beforeLabelText
in interface IValidationDelegate
afterLabelText
public void afterLabelText(IMarkupWriter writer,
IRequestCycle cycle,
IFormComponent component)
- Specified by:
afterLabelText
in interface IValidationDelegate
writeLabelPrefix
public void writeLabelPrefix(IFormComponent component,
IMarkupWriter writer,
IRequestCycle cycle)
- Specified by:
writeLabelPrefix
in interface IValidationDelegate
writeLabelAttributes
public void writeLabelAttributes(IMarkupWriter writer,
IRequestCycle cycle,
IFormComponent component)
- Specified by:
writeLabelAttributes
in interface IValidationDelegate
writeLabelSuffix
public void writeLabelSuffix(IFormComponent component,
IMarkupWriter writer,
IRequestCycle cycle)
- Specified by:
writeLabelSuffix
in interface IValidationDelegate
getHasErrors
public boolean getHasErrors()
- Specified by:
getHasErrors
in interface IValidationDelegate
getCurrentFieldTracking
public IFieldTracking getCurrentFieldTracking()
- Specified by:
getCurrentFieldTracking
in interface IValidationDelegate
getErrorRenderers
public List getErrorRenderers()
- Specified by:
getErrorRenderers
in interface IValidationDelegate
getFocusField
public String getFocusField()
- Specified by:
getFocusField
in interface IValidationDelegate
clearErrors
public void clearErrors()
- Specified by:
clearErrors
in interface IValidationDelegate
record
public void record(IFormComponent field,
String message)
- Specified by:
record
in interface IValidationDelegate
Copyright © 2006-2011 Apache Software Foundation. All Rights Reserved.