|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Constraint
A constraint.
Instead of implementing this interface from scratch,
you may use SimpleConstraint if applicable.
To have better responsiveness, you can handle more or all validations
at the client by implementing an additional interface,
ClientConstraint.
If you prefer to have a custom way to display
the error message (other than the default error box).
You can also implement CustomConstraint.
Then, CustomConstraint.showCustomError(org.zkoss.zk.ui.Component, org.zkoss.zk.ui.WrongValueException) is called instead of
showing the default error box.
In addition, ClientConstraint is ignored in this case,
since all validation will be done at the server.
CustomConstraint,
ClientConstraint| Method Summary | |
|---|---|
void |
validate(Component comp,
java.lang.Object value)
Verifies whether the value is acceptable. |
| Method Detail |
|---|
void validate(Component comp,
java.lang.Object value)
throws WrongValueException
comp - the component being validated
WrongValueException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||