|
GWT 2.7.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.
Instances of this interface are 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 {...});
}
HasRequestContext,
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()
Update the object being edited with the current state of the Editor. |
java.lang.String[] |
getPaths()
Returns a new array containing the request paths. |
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> violations)
Deprecated. Users should switch to EditorDriver.setConstraintViolations(Iterable) |
| Methods inherited from interface com.google.gwt.editor.client.EditorDriver |
|---|
accept, getErrors, hasErrors, isDirty, setConstraintViolations |
| Method Detail |
|---|
void display(P proxy)
proxy - a Proxy of type P
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()
flush in interface EditorDriver<RequestContext>edit(Object, RequestContext)
java.lang.IllegalStateException - if edit(Object, RequestContext) has
not been calledjava.lang.String[] getPaths()
void initialize(E editor)
EditorDelegate.subscribe() will do
nothing.
editor - an Editor of type E
void initialize(EventBus eventBus,
RequestFactory requestFactory,
E editor)
initialize(RequestFactory, Editor) to allow a modified
EventBus to be monitored for subscription services.
eventBus - the EventBusrequestFactory - a RequestFactory instanceeditor - an Editor of type EEditorDelegate.subscribe(),
ResettableEventBus
void initialize(RequestFactory requestFactory,
E editor)
requestFactory - a RequestFactory instanceeditor - an Editor of type EEditorDelegate.subscribe()@Deprecated boolean setViolations(java.lang.Iterable<Violation> violations)
EditorDriver.setConstraintViolations(Iterable)
EditorError objects whose
getUserData() method can be used to access the original Violation object.
violations - an Iterable over
Violation
instances
true if there were any unconsumed EditorErrors which
can be retrieved from EditorDriver.getErrors()
|
GWT 2.7.0 | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||