@Override public boolean checkValidity() { return ((ValueBoxBaseWithEditorErrors<String>) getValueBox()).checkValidity(); }
@Override public void showErrors(final List<EditorError> perrors) { final Set<String> messages = perrors.stream().filter(error -> this.editorErrorMatches(error)) .map(error -> error.getMessage()).collect(Collectors.toSet()); this.showErrors(messages); }
@Override public String getAutocomplete() { return ((ValueBoxBaseWithEditorErrors<String>) getValueBox()).getAutocomplete(); }
@Override public String getPattern() { return this.getInputElement().getPattern(); }
@Override public String getPlaceholder() { return ((ValueBoxBaseWithEditorErrors<String>) getValueBox()).getPlaceholder(); }
public InputElement getInputElement() { return getElement().cast(); }
/** * Checks if a error belongs to this widget. * * @param perror editor error to check * @return true if the error belongs to this widget */ protected boolean editorErrorMatches(final EditorError perror) { return perror != null && perror.getEditor() != null && (equals(perror.getEditor()) || perror.getEditor().equals(asEditor())); }
@Override public HTMLPanel getValidationMessageElement() { return ((ValueBoxBaseWithEditorErrors<String>) getValueBox()).getValidationMessageElement(); }
@Override public ValidityState getValidity() { return ((ValueBoxBaseWithEditorErrors<String>) getValueBox()).getValidity(); }
@Override public String getValidationMessage() { return ((ValueBoxBaseWithEditorErrors<String>) getValueBox()).getValidationMessage(); }
@Override public boolean isAutofocus() { return this.getInputElement().isAutofocus(); }
@Override public String getPlaceholder() { return ((ValueBoxBaseWithEditorErrors<String>) getValueBox()).getPlaceholder(); }
public InputElement getInputElement() { return getElement().cast(); }
/** * Checks if a error belongs to this widget. * * @param perror editor error to check * @return true if the error belongs to this widget */ protected boolean editorErrorMatches(final EditorError perror) { return perror != null && perror.getEditor() != null && (equals(perror.getEditor()) || perror.getEditor().equals(asEditor())); }
@Override public HTMLPanel getValidationMessageElement() { return ((ValueBoxBaseWithEditorErrors<String>) getValueBox()).getValidationMessageElement(); }
@Override public ValidityState getValidity() { return ((ValueBoxBaseWithEditorErrors<String>) getValueBox()).getValidity(); }
@Override public String getValidationMessage() { return ((ValueBoxBaseWithEditorErrors<String>) getValueBox()).getValidationMessage(); }
@Override public void setAutocomplete(final String arg) { this.getInputElement().setAutocomplete(arg); } }
@Override public void showErrors(final List<EditorError> perrors) { final Set<String> messages = perrors.stream().filter(error -> this.editorErrorMatches(error)) .map(error -> error.getMessage()).collect(Collectors.toSet()); this.showErrors(messages); }
@Override public boolean checkValidity() { return ((ValueBoxBaseWithEditorErrors<String>) getValueBox()).checkValidity(); }