Package com.google.gwt.editor.client
Interface SimpleBeanEditorDriver<T,E extends Editor<? super T>>
- Type Parameters:
T
- the type being editedE
- the Editor for the type
- All Superinterfaces:
EditorDriver<T>
- All Known Implementing Classes:
MockSimpleBeanEditorDriver
Automates editing of simple bean-like objects. The
EditorDelegate
provided from this driver has a no-op implementation of
EditorDelegate.subscribe()
.
interface MyDriver extends SimpleBeanEditorDriver<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.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Push the data in an object graph into the Editor given toinitialize(E)
.flush()
Update the object being edited with the current state of the Editor.void
initialize
(E editor) Initialize the editor driver.Methods inherited from interface com.google.gwt.editor.client.EditorDriver
accept, getErrors, hasErrors, isDirty, setConstraintViolations
-
Method Details
-
edit
Push the data in an object graph into the Editor given toinitialize(E)
.- Parameters:
object
- the object providing input data- Throws:
IllegalStateException
- ifinitialize(E)
has not been called
-
flush
T flush()Update the object being edited with the current state of the Editor.- Specified by:
flush
in interfaceEditorDriver<T>
- Returns:
- the object passed into
edit(Object)
- Throws:
IllegalStateException
- ifedit(Object)
has not been called
-
initialize
Initialize the editor driver.- Parameters:
editor
- the Editor to populate
-