|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.tapestry5.ValidationTrackerWrapper
public class ValidationTrackerWrapper
Wrapper around a ValidationTracker
that delegates all methods to the wrapped instance.
Subclasses will often override specific methods.
Constructor Summary | |
---|---|
ValidationTrackerWrapper(ValidationTracker delegate)
|
Method Summary | |
---|---|
void |
clear()
Clears all information stored by the tracker. |
protected ValidationTracker |
getDelegate()
Returns the instance to which methods are delegated. |
String |
getError(Field field)
Returns a previously recorded error message. |
List<String> |
getErrors()
Returns a list of all error messages. |
boolean |
getHasErrors()
Returns true if any field contains an error. |
String |
getInput(Field field)
Returns a previously recorded input value. |
boolean |
inError(Field field)
For a given field, determines if the field is "in error", meaning that an error message has been previously recorded for the field. |
void |
recordError(Field field,
String errorMessage)
Records an error message for a field. |
void |
recordError(String errorMessage)
Records an error message that is not associated with any specific field. |
void |
recordInput(Field field,
String input)
Called by a field to record the exact input from the user, prior to any validation. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ValidationTrackerWrapper(ValidationTracker delegate)
Method Detail |
---|
public void clear()
ValidationTracker
clear
in interface ValidationTracker
public String getError(Field field)
ValidationTracker
getError
in interface ValidationTracker
public List<String> getErrors()
ValidationTracker
getErrors
in interface ValidationTracker
public boolean getHasErrors()
ValidationTracker
getHasErrors
in interface ValidationTracker
public String getInput(Field field)
ValidationTracker
getInput
in interface ValidationTracker
public boolean inError(Field field)
ValidationTracker
inError
in interface ValidationTracker
public void recordError(Field field, String errorMessage)
ValidationTracker
ValidationException
thrown by a Validator
or Translator
.
recordError
in interface ValidationTracker
public void recordError(String errorMessage)
ValidationTracker
recordError
in interface ValidationTracker
public void recordInput(Field field, String input)
ValidationTracker
recordInput
in interface ValidationTracker
field
- the field recording the inputinput
- the value obtained from the forms submissionprotected ValidationTracker getDelegate()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |