public interface

CompositeEditor

implements ValueAwareEditor<T>
com.google.gwt.editor.client.CompositeEditor<T, C, E extends com.google.gwt.editor.client.Editor<C>>
Known Indirect Subclasses

Class Overview

An interface that indicates that a given Editor is composed of an unknown number of sub-Editors all of the same type.

For example, the ListEditor type is a CompositeEditor<List<T>, T, E extends Editor<T>>; that is, ListEditor will accept a List<T> and will edit some unknown number of T's using the Editor type E. Another example might be:

 class WorkgroupEditor implements CompositeEditor<Workgroup, Person, PersonSummaryEditor>{
   public void setValue(Workgroup workgroup) {
     // Assuming Workgroup implements Iterable<Person>
     for (Person p : workgroup) {
       PersonSummaryEditor editor = new PersonSummaryEditor();
       // Attach editor to DOM
       somePanel.add(editor);
       // Let the generated code drive the sub-editor
       editorChain.attach(p, editor);
     }
   }
 }
 

Summary

Nested Classes
interface CompositeEditor.EditorChain<C, E extends Editor<C>> Allows instances of the component type to be attached to the Editor framework. 
Public Methods
abstract E createEditorForTraversal()
Returns an canonical sub-editor instance that will be used by the driver for computing all edited paths.
abstract String getPathElement(E subEditor)
Used to implement getPath() for the component Editors.
abstract void setEditorChain(EditorChain<C, E> chain)
Called by the Editor framework to provide the CompositeEditor.EditorChain.
[Expand]
Inherited Methods
From interface com.google.gwt.editor.client.HasEditorDelegate
From interface com.google.gwt.editor.client.ValueAwareEditor

Public Methods

public abstract E createEditorForTraversal ()

Returns an canonical sub-editor instance that will be used by the driver for computing all edited paths.

Returns
  • an instance of the Editor type

public abstract String getPathElement (E subEditor)

Used to implement getPath() for the component Editors.

Parameters
subEditor an instance of the Editor type previously passed into attach(C, E)
Returns
  • the path element as a String

public abstract void setEditorChain (EditorChain<C, E> chain)

Called by the Editor framework to provide the CompositeEditor.EditorChain.

Parameters
chain an CompositeEditor.EditorChain instance