|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jsxp.framework.Validator
public class Validator
The Class Validator. You need it, if you use
the jsxp frameworks basic validation features to validate input parameter.
You can create a Validator-instance anywhere.
Use the ViewController.createValidator()
method. The standard way is to use it
in your ViewController.validate()
method.
ValidationError
Field Summary | |
---|---|
protected static java.lang.String |
VALIDATION_ERROR_LIST
The Constant VALIDATION_ERROR_LIST. |
Constructor Summary | |
---|---|
Validator(ViewController ViewController)
Instantiates a new validator. |
Method Summary | |
---|---|
void |
addValidationError(java.lang.String message,
ElementProcessor... elementProcessors)
Adds the validation error. |
boolean |
hasErrors()
Checks for errors. |
void |
validate(boolean condition,
java.lang.String message,
ElementProcessor... elementProcessors)
Validates a condition and add an validation error in one step |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final java.lang.String VALIDATION_ERROR_LIST
Constructor Detail |
---|
public Validator(ViewController ViewController)
ViewController
- the view controllerMethod Detail |
---|
public void addValidationError(java.lang.String message, ElementProcessor... elementProcessors)
ViewController.skipExecution()
.
Also the the ViewController will be redirected to Context.getLastView()
. And the method
Context.saveInputToRestoreLater()
will be called, so that the next view controller
can get the input parameters even after a redirect by implementing ViewController.getPreviousInputParameterBean()
.
message
- elementProcessors
- public boolean hasErrors()
public void validate(boolean condition, java.lang.String message, ElementProcessor... elementProcessors)
condition
- message
- elementProcessors
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |