customconstraint.java

来自「ZK 基础介绍 功能操作 模块 结合数据库操作」· Java 代码 · 共 49 行

JAVA
49
字号
/* CustomConstraint.java{{IS_NOTE	Purpose:			Description:			History:		Wed Apr 11 17:59:43     2007, Created by tomyeh}}IS_NOTECopyright (C) 2007 Potix Corporation. All Rights Reserved.{{IS_RIGHT	This program is distributed under GPL Version 2.0 in the hope that	it will be useful, but WITHOUT ANY WARRANTY.}}IS_RIGHT*/package org.zkoss.zul;import org.zkoss.zk.ui.Component;import org.zkoss.zk.ui.WrongValueException;/** * Additional interface implemented with {@link Constraint} to 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, {@link #showCustomError} is called. * * <p>Note: if this interface is implemented, * {@link ClientConstraint} is ignored, since all validation will be done * at the server. * * @author tomyeh * @see Constraint * @see ClientConstraint */public interface CustomConstraint {	/** 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.	 *	 * @param comp the component causing the error.	 * @param ex the error to display, or null to clear	 * the error message.	 */	public void showCustomError(Component comp, WrongValueException ex);}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?