Package org.apache.tapestry5
Class ValidationTrackerWrapper
java.lang.Object
org.apache.tapestry5.ValidationTrackerWrapper
- All Implemented Interfaces:
ValidationTracker
Wrapper around a
ValidationTracker that delegates all methods to the wrapped instance.
Subclasses will often override specific methods.- Since:
- 5.2.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Clears all information stored by the tracker.protected ValidationTrackerReturns the instance to which methods are delegated.Returns a previously recorded error message.Returns a list of all error messages.booleanReturns true if any field contains an error.Returns a previously recorded input value.Returns just the errors that are not associated with any fields.booleanFor a given field, determines if the field is "in error", meaning that an error message has been previously recorded for the field.voidrecordError(String errorMessage) Records an error message that is not associated with any specific field.voidrecordError(Field field, String errorMessage) Records an error message for a field.voidrecordInput(Field field, String input) Called by a field to record the exact input from the user, prior to any validation.
-
Constructor Details
-
ValidationTrackerWrapper
-
-
Method Details
-
clear
Description copied from interface:ValidationTrackerClears all information stored by the tracker.- Specified by:
clearin interfaceValidationTracker
-
getError
Description copied from interface:ValidationTrackerReturns a previously recorded error message.- Specified by:
getErrorin interfaceValidationTracker
-
getErrors
Description copied from interface:ValidationTrackerReturns a list of all error messages. The messages are stored in the order that they were added to the tracker, except that unassociated errors (unassociated with any field) are listed first.- Specified by:
getErrorsin interfaceValidationTracker
-
getUnassociatedErrors
Description copied from interface:ValidationTrackerReturns just the errors that are not associated with any fields.- Specified by:
getUnassociatedErrorsin interfaceValidationTracker
-
getHasErrors
Description copied from interface:ValidationTrackerReturns true if any field contains an error.- Specified by:
getHasErrorsin interfaceValidationTracker
-
getInput
Description copied from interface:ValidationTrackerReturns a previously recorded input value.- Specified by:
getInputin interfaceValidationTracker
-
inError
Description copied from interface:ValidationTrackerFor a given field, determines if the field is "in error", meaning that an error message has been previously recorded for the field.- Specified by:
inErrorin interfaceValidationTracker- Returns:
- true if an error message is present
-
recordError
Description copied from interface:ValidationTrackerRecords an error message for a field. The error message is primarily derived from aValidationExceptionthrown by aValidatororTranslator.- Specified by:
recordErrorin interfaceValidationTracker
-
recordError
Description copied from interface:ValidationTrackerRecords an error message that is not associated with any specific field. This often reflects some amount of cross-form validation.- Specified by:
recordErrorin interfaceValidationTracker
-
recordInput
Description copied from interface:ValidationTrackerCalled by a field to record the exact input from the user, prior to any validation. If the form is redisplayed (to present errors), the input value will be sent back to the user for correction.- Specified by:
recordInputin interfaceValidationTracker- Parameters:
field- the field recording the inputinput- the value obtained from the forms submission
-
getDelegate
Returns the instance to which methods are delegated.
-