org.zkoss.bind.validator
Class AbstractValidator

java.lang.Object
  extended by org.zkoss.bind.validator.AbstractValidator
All Implemented Interfaces:
Validator
Direct Known Subclasses:
BeanValidator, FormBeanValidator

public abstract class AbstractValidator
extends java.lang.Object
implements Validator

A abstract validator the handling validation message

Since:
6.0.0
Author:
dennis
See Also:
ValidationMessages

Constructor Summary
AbstractValidator()
           
 
Method Summary
protected  void addInvalidMessage(ValidationContext ctx, java.lang.String message)
          add a message to validation context, when you call this method, it also set context invalid.
protected  void addInvalidMessage(ValidationContext ctx, java.lang.String key, java.lang.String message)
          add a message to validation context, when you call this method, it also sets context invalid.
protected  void addInvalidMessages(ValidationContext ctx, java.lang.String[] messages)
          add multiple messages to validation context, when you call this method, it also sets the context invalid.
protected  void addInvalidMessages(ValidationContext ctx, java.lang.String key, java.lang.String[] messages)
          add multiple messages to validation context, when you call this method, it also sets the context invalid.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.zkoss.bind.Validator
validate
 

Constructor Detail

AbstractValidator

public AbstractValidator()
Method Detail

addInvalidMessage

protected void addInvalidMessage(ValidationContext ctx,
                                 java.lang.String message)
add a message to validation context, when you call this method, it also set context invalid.

Parameters:
ctx - the validation context
message - the message of validation

addInvalidMessage

protected void addInvalidMessage(ValidationContext ctx,
                                 java.lang.String key,
                                 java.lang.String message)
add a message to validation context, when you call this method, it also sets context invalid.

Parameters:
ctx - the validation context
key - the custom key of message
message - the message of validation

addInvalidMessages

protected void addInvalidMessages(ValidationContext ctx,
                                  java.lang.String[] messages)
add multiple messages to validation context, when you call this method, it also sets the context invalid.

Parameters:
ctx - the validation context
messages - messages of validation

addInvalidMessages

protected void addInvalidMessages(ValidationContext ctx,
                                  java.lang.String key,
                                  java.lang.String[] messages)
add multiple messages to validation context, when you call this method, it also sets the context invalid.

Parameters:
ctx - the validation context
key - the custom key of message
messages - messages of validation


Copyright © 2005-2011 Potix Corporation. All Rights Reserved. SourceForge.net Logo