|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.tapestry5.BaseOptimizedSessionPersistedObject org.apache.tapestry5.ValidationTrackerImpl
public final class ValidationTrackerImpl
Standard implementation of ValidationTracker
. Works pretty hard to ensure a minimum
amount of data is stored
in the HttpSession.
Constructor Summary | |
---|---|
ValidationTrackerImpl()
|
Method Summary | |
---|---|
void |
clear()
Clears all information stored by the tracker. |
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 org.apache.tapestry5.BaseOptimizedSessionPersistedObject |
---|
checkAndResetDirtyMarker, markDirty |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ValidationTrackerImpl()
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 submission
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |