T - the type being editedE - the Editor for the typepublic interface BeanValidationEditorDriver<T,E extends com.google.gwt.editor.client.Editor<? super T>> extends com.google.gwt.editor.client.EditorDriver<T>, HasFormSubmitHandlers<T>, com.google.gwt.event.logical.shared.HasValueChangeHandlers<T>
EditorDelegate provided from this
driver has a no-op implementation of EditorDelegate.subscribe().
interface MyDriver extends AbstractBeanValidationEditorDriver<MyObject, MyObjectEditor> {
}
MyDriver instance = GWT.create(MyDriver.class);
{
MyObjectEditor editor = new MyObjectEditor();
instance.initialize(editor);
// Do stuff
instance.edit(myObjectInstance);
// Do more stuff
instance.flush();
}
Note that this interface is intended to be implemented by generated code and is subject to API expansion in the future.
MockSimpleBeanEditorDriver| Modifier and Type | Method and Description |
|---|---|
void |
edit(T object)
Push the data in an object graph into the Editor given to
initialize(E). |
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()
Deprecated.
As of release 0.8.2, replaced by getCheckTime()
|
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)
Deprecated.
As of release 0.8.2, replaced by setCheckTime()
|
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, getErrors, hasErrors, isDirty, setConstraintViolationsaddFormSubmitHandlervoid edit(T object)
initialize(E).object - the object providing input dataIllegalStateException - if initialize(E) has not been calledT flush()
flush in interface com.google.gwt.editor.client.EditorDriver<T>edit(Object)IllegalStateException - if edit(Object) has not been calledvoid initialize(E editor)
editor - the Editor to populateboolean validate()
boolean tryToSubmitFrom()
FormSubmitEvent is thrown.boolean isSubmitUnchanged()
void setSubmitUnchanged(boolean psubmitUnchanged)
psubmitUnchanged - the submitUnchanged to set@Deprecated boolean isCheckOnKeyUp()
@Deprecated void setCheckOnKeyUp(boolean pcheckOnKeyUp) throws RuntimeException
pcheckOnKeyUp - true/falseRuntimeException - if this method is called after a edit callCheckTimeEnum getCheckTime()
void setCheckTime(CheckTimeEnum pcheckTime) throws RuntimeException
pcheckTime - check time enumerationRuntimeException - if this method is called after a edit callboolean isSubmitOnReturn()
void setSubmitOnReturn(boolean psubmitOnReturn)
throws RuntimeException
psubmitOnReturn - true/falseRuntimeException - if this method is called after a edit callvoid setSubmitButton(com.google.gwt.user.client.ui.Widget psubmitButton)
psubmitButton - the submitUnchanged to setvoid setValidationGroups(Class<?>... pgroups)
pgroups - group or list of groups targeted for validation (default to
Default)Copyright © 2015–2016. All rights reserved.