Example usage for com.google.gwt.editor.client.adapters ListEditor getList

List of usage examples for com.google.gwt.editor.client.adapters ListEditor getList

Introduction

In this page you can find the example usage for com.google.gwt.editor.client.adapters ListEditor getList.

Prototype

public List<T> getList() 

Source Link

Document

Returns a live view of the ListEditor's backing data.

Usage

From source file:com.google.gwt.sample.dynatablerf.client.widgets.FavoritesWidget.java

License:Apache License

public FavoritesWidget(EventBus eventBus, RequestFactory factory, FavoritesManager manager) {
    this.eventBus = eventBus;
    this.factory = factory;
    this.manager = manager;

    // Create the UI
    initWidget(GWT.<Binder>create(Binder.class).createAndBindUi(this));

    // Create the driver which manages the data-bound widgets
    Driver driver = GWT.<Driver>create(Driver.class);

    // Use a ListEditor that uses our NameLabelSource
    ListEditor<PersonProxy, NameLabel> editor = ListEditor.of(new NameLabelSource());

    // Configure the driver
    ListEditor<PersonProxy, NameLabel> listEditor = editor;
    driver.initialize(eventBus, factory, listEditor);

    // Notice the backing list is essentially anonymous.
    driver.display(new ArrayList<PersonProxy>());

    // Modifying this list triggers widget creation and destruction
    displayedList = listEditor.getList();
}