Class HasDataPresenter<T>

java.lang.Object
com.google.gwt.user.cellview.client.HasDataPresenter<T>
Type Parameters:
T - the data type of items in the list
All Implemented Interfaces:
HasHandlers, HasKeyboardPagingPolicy, HasKeyboardSelectionPolicy, HasCellPreviewHandlers<T>, HasData<T>, HasKeyProvider<T>, HasRows

class HasDataPresenter<T> extends Object implements HasData<T>, HasKeyProvider<T>, HasKeyboardPagingPolicy

Presenter implementation of HasData that presents data for various cell based widgets. This class contains most of the shared logic used by these widgets, making it easier to test the common code.

In proper MVP design, user code would interact with the presenter. However, that would complicate the widget code. Instead, each widget owns its own presenter and contains its own View. The widget forwards commands through to the presenter, which then updates the widget via the view. This keeps the user facing API simpler.

Updates are not pushed to the view immediately. Instead, the presenter collects updates and resolves them all in a finally command. This reduces the total number of DOM manipulations, and makes it easier to handle side effects in user code triggered by the rendering pass. The view is responsible for called flush() to force the presenter to synchronize the view when needed.