|
GWT 2.1.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
P - the type of Proxy being editedE - the type of Editor that will edit the Recordpublic interface RequestFactoryEditorDriver<P,E extends Editor<? super P>>
The interface that links RequestFactory and the Editor framework together. Used for configuration and lifecycle control. Expected that this will be created with
interface MyRFED extends RequestFactoryEditorDriver<MyObjectProxy, MyObjectEditor> {}
MyRFED instance = GWT.create(MyRFED.class);
{
instance.initialize(.....);
myRequest.with(instance.getPaths());
// Fire the request, in the callback
instance.edit(retrievedRecord);
// Control when the request is sent
instance.flush().fire(new Receiver {...});
}
See com.google.gwt.requestfactory.client.testing.MockRequestFactoryEditorDriver
| Method Summary | |
|---|---|
void |
display(P proxy)
Start driving the Editor and its sub-editors with data for display-only mode. |
void |
edit(P proxy,
RequestContext request)
Start driving the Editor and its sub-editors with data. |
RequestContext |
flush()
Ensures that the Editor passed into initialize(com.google.gwt.event.shared.EventBus, com.google.gwt.requestfactory.shared.RequestFactory, E) and its
sub-editors, if any, have synced their UI state by invoking flushing them
in a depth-first manner. |
java.util.List<EditorError> |
getErrors()
Returns any unconsumed EditorErrors from the last call to flush(). |
java.lang.String[] |
getPaths()
Returns a new array. |
boolean |
hasErrors()
Indicates if the last call to flush() resulted in any errors. |
void |
initialize(E editor)
Initializes a driver that will not be able to support subscriptions. |
void |
initialize(EventBus eventBus,
RequestFactory requestFactory,
E editor)
Overload of initialize(RequestFactory, Editor) to allow a modified
EventBus to be monitored for subscription services. |
void |
initialize(RequestFactory requestFactory,
E editor)
Initializes a driver with the editor it will run, and a RequestFactory to use for subscription services. |
boolean |
setViolations(java.lang.Iterable<Violation> errors)
Show Violations returned from an attempt to submit a request. |
| Method Detail |
|---|
void display(P proxy)
void edit(P proxy,
RequestContext request)
RequestContext is required to provide context for the changes to
the proxy (see RequestContext.edit(T). Note that this driver will
not fire the request.
proxy - the proxy to be editedrequest - the request context that will accumulate edits and is
returned form flush()RequestContext flush()
initialize(com.google.gwt.event.shared.EventBus, com.google.gwt.requestfactory.shared.RequestFactory, E) and its
sub-editors, if any, have synced their UI state by invoking flushing them
in a depth-first manner.
edit(P, com.google.gwt.requestfactory.shared.RequestContext)
java.lang.IllegalStateException - if edit(Object, RequestContext) has
not been called with a non-null RequestContextjava.util.List<EditorError> getErrors()
flush().
java.lang.String[] getPaths()
boolean hasErrors()
flush() resulted in any errors.
void initialize(EventBus eventBus,
RequestFactory requestFactory,
E editor)
initialize(RequestFactory, Editor) to allow a modified
EventBus to be monitored for subscription services.
EditorDelegate.subscribe(),
ResettableEventBus
void initialize(RequestFactory requestFactory,
E editor)
EditorDelegate.subscribe()void initialize(E editor)
EditorDelegate.subscribe() will do
nothing.
boolean setViolations(java.lang.Iterable<Violation> errors)
EditorError objects whose
getUserData() method can be used to
access the original Violation object.
true if there were any unconsumed EditorErrors which
can be retrieved from getErrors()
|
GWT 2.1.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||