Package org.zkoss.zul
Interface CustomConstraint
-
public interface CustomConstraintAdditional interface implemented withConstraintto denote a constraint supports a custom way to display the error message. If this interface is implemented, the default error box won't be displayed. Rather,showCustomError(org.zkoss.zk.ui.Component, org.zkoss.zk.ui.WrongValueException)is called.Since 5.0.0,
CustomConstrainthas the higher priority thanClientConstraint. In other words,ClientConstraintis ignored if both defined. On the other hand, the client validation object (ClientConstraint.getClientConstraint()) can implement the showCustomError method to do the similar job at the client.- Author:
- tomyeh
- See Also:
Constraint,ClientConstraint
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidshowCustomError(org.zkoss.zk.ui.Component comp, org.zkoss.zk.ui.WrongValueException ex)To display the error message in a custom way.
-
-
-
Method Detail
-
showCustomError
void showCustomError(org.zkoss.zk.ui.Component comp, org.zkoss.zk.ui.WrongValueException ex)To display the error message in a custom way. Note: this method is called either with a error or not, depending on whether ex is null.- Parameters:
comp- the component causing the error.ex- the error to display, or null to clear the error message.
-
-