Package com.sencha.gxt.widget.core.client.form.error

Examples of com.sencha.gxt.widget.core.client.form.error.DefaultEditorError


   */
  public void markInvalid(String msg) {
    if (delegate != null) {
      delegate.recordError(forceInvalidText, getValue(), null);
    }
    markInvalid(Util.<EditorError> createList(new DefaultEditorError(this, msg, getValue())));
  }
View Full Code Here


    }
    return list;
  }
 
  protected static List<EditorError> createError(Editor<?> editor, String message, Object value) {
    return createError(new DefaultEditorError(editor, message, value));
  }
View Full Code Here

   * {@link #forceInvalid(String)}
   *
   * @param msg the validation message
   */
  public void markInvalid(String msg) {
    markInvalid(Collections.<EditorError>singletonList(new DefaultEditorError(this, msg, getValue())));
  }
View Full Code Here

  @Override
  public List<EditorError> validate(Editor<T> editor, T value) {
    if (value == null || "".equals(value)) {
      List<EditorError> errors = new ArrayList<EditorError>();
      errors.add(new DefaultEditorError(editor, getMessages().blankText(), ""));
      return errors;
    }
    return null;
  }
View Full Code Here

  @Override
  public List<EditorError> validate(Editor<String> field, String value) {
    if (value == null) return null;
    int length = value.length();
    if (length > maxLength) {
      return createError(new DefaultEditorError(field, getMessages().maxLengthText(maxLength), value));
    }
    return null;
  }
View Full Code Here

    if (value == null) {
      return null;
    }
    int length = value.length();
    if (length < minLength) {
      return createError(new DefaultEditorError(field, getMessages().minLengthText(minLength), value));
    }
    return null;
  }
View Full Code Here

  @Override
  public List<EditorError> validate(Editor<String> field, String value) {
    if (value != null && !value.equals("")) {
      if (!value.matches(regex)) {
        return createError(new DefaultEditorError(field, getMessages().regExMessage(), value));
      }
    }
    return null;
  }
View Full Code Here

   * {@link #forceInvalid(String)}
   *
   * @param msg the validation message
   */
  public void markInvalid(String msg) {
    markInvalid(Collections.<EditorError> singletonList(new DefaultEditorError(this, msg, getValue())));
  }
View Full Code Here

    }
    return list;
  }
 
  protected static List<EditorError> createError(Editor<?> editor, String message, Object value) {
    return Collections.<EditorError>singletonList(new DefaultEditorError(editor, message, value));
  }
View Full Code Here

  @Override
  public List<EditorError> validate(Editor<T> editor, T value) {
    if (value == null || "".equals(value)) {
      List<EditorError> errors = new ArrayList<EditorError>();
      errors.add(new DefaultEditorError(editor, getMessages().blankText(), ""));
      return errors;
    }
    return null;
  }
View Full Code Here

TOP

Related Classes of com.sencha.gxt.widget.core.client.form.error.DefaultEditorError

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.