T - the type being editedE - the Editor typepublic abstract class AbstractBeanValidationEditorDriver<T,E extends com.google.gwt.editor.client.Editor<T>> extends AbstractExtendedBaseEditorDriver<T,E> implements BeanValidationEditorDriver<T,E>
| Constructor and Description |
|---|
AbstractBeanValidationEditorDriver()
default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
com.google.gwt.event.shared.HandlerRegistration |
addFormSubmitHandler(FormSubmitHandler<T> phandler)
Adds a
FormSubmitEvent handler. |
com.google.gwt.event.shared.HandlerRegistration |
addValueChangeHandler(com.google.gwt.event.logical.shared.ValueChangeHandler<T> phandler) |
void |
edit(T object)
Push the data in an object graph into the Editor given to
BeanValidationEditorDriver.initialize(E). |
void |
fireEvent(com.google.gwt.event.shared.GwtEvent<?> pevent) |
T |
flush()
Update the object being edited with the current state of the Editor.
|
CheckTimeEnum |
getCheckTime()
get the time of validation.
|
void |
initialize(E editor)
Initialize the editor driver.
|
boolean |
isCheckOnKeyUp()
get state of validation on key up (check on every key up event).
|
boolean |
isSubmitOnReturn()
get state of submit on return (form is submitted if it's valid and return/enter is pressed).
|
boolean |
isSubmitUnchanged()
submit unchanged forms.
|
void |
setCheckOnKeyUp(boolean pcheckOnKeyUp)
set state of validation on key up (check on every key up event), to change this state is only
possible, before the first edit call was done.
|
void |
setCheckTime(CheckTimeEnum pcheckTime)
set time of validation, to change this state is only possible, before the first edit call was
done.
|
void |
setSubmitButton(com.google.gwt.user.client.ui.Widget psubmitButton)
setter to add as submit button which is automatically .
|
void |
setSubmitOnReturn(boolean psubmitOnReturn)
set state of submit on return (form is submitted if it's valid and return/enter is pressed). to
change this state is only possible, before the first edit call was done.
|
void |
setSubmitUnchanged(boolean psubmitUnchanged)
setter to change submit unchanged forms.
|
void |
setValidationGroups(Class<?>... pgroups)
set validation groups.
|
boolean |
tryToSubmitFrom()
try to submit form, if validation is ok, a
FormSubmitEvent is thrown. |
boolean |
validate()
start bean validation.
|
accept, configureDelegate, createDelegate, createInitializerVisitor, doEdit, doFlush, doInitialize, doSetViolations, getDelegate, getEditor, getErrors, getLeafValueMap, getObject, getViolationKeyMethod, hasErrors, isDirty, setConstraintViolations, toStringpublic AbstractBeanValidationEditorDriver()
public void edit(T object)
BeanValidationEditorDriverBeanValidationEditorDriver.initialize(E).edit in interface BeanValidationEditorDriver<T,E extends com.google.gwt.editor.client.Editor<T>>object - the object providing input datapublic T flush()
BeanValidationEditorDriverflush in interface com.google.gwt.editor.client.EditorDriver<T>flush in interface BeanValidationEditorDriver<T,E extends com.google.gwt.editor.client.Editor<T>>BeanValidationEditorDriver.edit(Object)public void initialize(E editor)
BeanValidationEditorDriverinitialize in interface BeanValidationEditorDriver<T,E extends com.google.gwt.editor.client.Editor<T>>editor - the Editor to populatepublic final boolean validate()
BeanValidationEditorDrivervalidate in interface BeanValidationEditorDriver<T,E extends com.google.gwt.editor.client.Editor<T>>public final com.google.gwt.event.shared.HandlerRegistration addFormSubmitHandler(FormSubmitHandler<T> phandler)
HasFormSubmitHandlersFormSubmitEvent handler.addFormSubmitHandler in interface HasFormSubmitHandlers<T>phandler - the handlerpublic final com.google.gwt.event.shared.HandlerRegistration addValueChangeHandler(com.google.gwt.event.logical.shared.ValueChangeHandler<T> phandler)
addValueChangeHandler in interface com.google.gwt.event.logical.shared.HasValueChangeHandlers<T>public void fireEvent(com.google.gwt.event.shared.GwtEvent<?> pevent)
fireEvent in interface com.google.gwt.event.shared.HasHandlerspublic final boolean tryToSubmitFrom()
BeanValidationEditorDriverFormSubmitEvent is thrown.tryToSubmitFrom in interface BeanValidationEditorDriver<T,E extends com.google.gwt.editor.client.Editor<T>>public final boolean isSubmitUnchanged()
BeanValidationEditorDriverisSubmitUnchanged in interface BeanValidationEditorDriver<T,E extends com.google.gwt.editor.client.Editor<T>>public final void setSubmitUnchanged(boolean psubmitUnchanged)
BeanValidationEditorDriversetSubmitUnchanged in interface BeanValidationEditorDriver<T,E extends com.google.gwt.editor.client.Editor<T>>psubmitUnchanged - the submitUnchanged to setpublic final boolean isCheckOnKeyUp()
BeanValidationEditorDriverisCheckOnKeyUp in interface BeanValidationEditorDriver<T,E extends com.google.gwt.editor.client.Editor<T>>public final void setCheckOnKeyUp(boolean pcheckOnKeyUp)
throws RuntimeException
BeanValidationEditorDriversetCheckOnKeyUp in interface BeanValidationEditorDriver<T,E extends com.google.gwt.editor.client.Editor<T>>pcheckOnKeyUp - true/falseRuntimeException - if this method is called after a edit callpublic final CheckTimeEnum getCheckTime()
BeanValidationEditorDrivergetCheckTime in interface BeanValidationEditorDriver<T,E extends com.google.gwt.editor.client.Editor<T>>public final void setCheckTime(CheckTimeEnum pcheckTime) throws RuntimeException
BeanValidationEditorDriversetCheckTime in interface BeanValidationEditorDriver<T,E extends com.google.gwt.editor.client.Editor<T>>pcheckTime - check time enumerationRuntimeException - if this method is called after a edit callpublic final boolean isSubmitOnReturn()
BeanValidationEditorDriverisSubmitOnReturn in interface BeanValidationEditorDriver<T,E extends com.google.gwt.editor.client.Editor<T>>public final void setSubmitOnReturn(boolean psubmitOnReturn)
throws RuntimeException
BeanValidationEditorDriversetSubmitOnReturn in interface BeanValidationEditorDriver<T,E extends com.google.gwt.editor.client.Editor<T>>psubmitOnReturn - true/falseRuntimeException - if this method is called after a edit callpublic final void setSubmitButton(com.google.gwt.user.client.ui.Widget psubmitButton)
BeanValidationEditorDriversetSubmitButton in interface BeanValidationEditorDriver<T,E extends com.google.gwt.editor.client.Editor<T>>psubmitButton - the submitUnchanged to setpublic final void setValidationGroups(Class<?>... pgroups)
BeanValidationEditorDriversetValidationGroups in interface BeanValidationEditorDriver<T,E extends com.google.gwt.editor.client.Editor<T>>pgroups - group or list of groups targeted for validation (default to
Default)Copyright © 2015–2016. All rights reserved.