Package eu.maydu.gwt.validation.client

Examples of eu.maydu.gwt.validation.client.InvalidValueSerializable


   * @param msgKey The key for the custom message
   * @param propertyName The property name of the field the validation error belongs to
   * @throws ValidationException The exception is always thrown by this method (thats its use ;>)
   */
  public static void exception(String msgKey, String propertyName, Object... params) throws ValidationException {
    InvalidValueSerializable iv = new InvalidValueSerializable();
   
    if(params != null && params.length > 0) {
     
      //merge parameters into message key
      for(Object o: params) {
        msgKey += ":"+o.toString();
      }
    }
   
    iv.setMessage(msgKey);
    iv.setPropertyName(propertyName);
    ValidationException ex = new ValidationException();
    ex.getInvalidValues().add(iv);
    throw ex;
  }
View Full Code Here


   
    if(throwOnFirstError)
      exception(msgKey, propertyName, params);
    else {
      msgKey = addParamsToMessageKey(msgKey, params);
      InvalidValueSerializable iv = new InvalidValueSerializable();
      iv.setMessage(msgKey);
      iv.setPropertyName(propertyName);
      invalidPool.add(iv);
    }
    return this;
     
  }
View Full Code Here

TOP

Related Classes of eu.maydu.gwt.validation.client.InvalidValueSerializable

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.