T
- the type of data returned from flush()
public interface EditorDriver<T>
The EditorDriver
interface cannot be used with
GWT.create()
directly.
Instead, use one of the specializations of this interface.
SimpleBeanEditorDriver
,
RequestFactoryEditorDriver
Modifier and Type | Method and Description |
---|---|
void |
accept(EditorVisitor visitor)
Visit the Editor hierarchy controlled by the EditorDriver.
|
T |
flush()
Update the object being edited with the current state of the Editor.
|
java.util.List<EditorError> |
getErrors()
Returns any unconsumed EditorErrors from the last call to
flush() . |
boolean |
hasErrors()
Indicates if the last call to
flush() resulted in any errors. |
boolean |
isDirty()
Returns
true if any of the Editors in the hierarchy have been
modified relative to the last value passed into SimpleBeanEditorDriver.edit(Object) . |
boolean |
setConstraintViolations(java.lang.Iterable<ConstraintViolation<?>> violations)
Show
ConstraintViolations generated through a
Validator . |
void accept(EditorVisitor visitor)
T flush()
java.util.List<EditorError> getErrors()
flush()
.EditorError
instancesboolean hasErrors()
flush()
resulted in any errors.true
if errors are presentboolean isDirty()
true
if any of the Editors in the hierarchy have been
modified relative to the last value passed into SimpleBeanEditorDriver.edit(Object)
.
This method is not affected by flush()
to support the following
workflow:
EditorDriver.edit()
EditorDriver.flush()
isDirty()
is correct for the above workflow. If the
flush()
method were to clear the dirty state, it would be
necessary to implement an alternate flag to distinguish between a
newly-initialized editor entering step 2 or re-entering step 2.EditorDelegate.setDirty(boolean)
boolean setConstraintViolations(java.lang.Iterable<ConstraintViolation<?>> violations)
ConstraintViolations
generated through a
Validator
. The violations will be
converted into EditorError
objects whose
getUserData()
method can be used to
access the original ConstraintViolation object.violations
- an Iterable over ConstraintViolation
instancestrue
if there were any unconsumed EditorErrors which
can be retrieved from getErrors()