public abstract class

AbstractRequestFactoryEditorDriver

extends Object
implements RequestFactoryEditorDriver<P, E extends Editor<? super P>>
java.lang.Object
   ↳ com.google.gwt.requestfactory.client.impl.AbstractRequestFactoryEditorDriver<R, E extends com.google.gwt.editor.client.Editor<R>>

Class Overview

Contains utility methods for top-level driver implementations.

Summary

Public Constructors
AbstractRequestFactoryEditorDriver()
Public Methods
void display(R object)
void edit(R object, RequestContext saveRequest)
RequestContext flush()
Ensures that the Editor passed into initialize(E) and its sub-editors, if any, have synced their UI state by invoking flushing them in a depth-first manner.
List<EditorError> getErrors()
Returns any unconsumed EditorErrors from the last call to flush().
String[] getPaths()
Returns a new array containing the request paths.
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(Iterable<Violation> violations)
Show Violations returned from an attempt to submit a request.
Protected Methods
abstract RequestFactoryEditorDelegate<R, E> createDelegate()
E getEditor()
abstract void traverseEditors(List<String> paths)
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.google.gwt.requestfactory.client.RequestFactoryEditorDriver

Public Constructors

public AbstractRequestFactoryEditorDriver ()

Public Methods

public void display (R object)

public void edit (R object, RequestContext saveRequest)

public RequestContext flush ()

Ensures that the Editor passed into initialize(E) and its sub-editors, if any, have synced their UI state by invoking flushing them in a depth-first manner.

Returns

public List<EditorError> getErrors ()

Returns any unconsumed EditorErrors from the last call to flush().

Returns

public String[] getPaths ()

Returns a new array containing the request paths.

Returns
  • an array of Strings

public boolean hasErrors ()

Indicates if the last call to flush() resulted in any errors.

Returns
  • true if errors are present

public void initialize (E editor)

Initializes a driver that will not be able to support subscriptions. Calls to subscribe() will do nothing.

Parameters
editor an Editor of type E

public void initialize (EventBus eventBus, RequestFactory requestFactory, E editor)

Overload of initialize(RequestFactory, Editor) to allow a modified EventBus to be monitored for subscription services.

Parameters
eventBus the EventBus
requestFactory a RequestFactory instance
editor an Editor of type E

public void initialize (RequestFactory requestFactory, E editor)

Initializes a driver with the editor it will run, and a RequestFactory to use for subscription services.

Parameters
requestFactory a RequestFactory instance
editor an Editor of type E

public boolean setViolations (Iterable<Violation> violations)

Show Violations returned from an attempt to submit a request. The violations will be converted into EditorError objects whose getUserData() method can be used to access the original Violation object.

Parameters
violations a Iterable over Violation instances
Returns
  • true if there were any unconsumed EditorErrors which can be retrieved from getErrors()

Protected Methods

protected abstract RequestFactoryEditorDelegate<R, E> createDelegate ()

protected E getEditor ()

protected abstract void traverseEditors (List<String> paths)