An activity in GWT 2.1 is analogous to a presenter in MVP
terminology. It contains no Widgets or UI code. Activities are started
and stopped by an ActivityManager associated with a container Widget. A
powerful new feature in GWT 2.1 is that an Activity can automatically
display a warning confirmation when the Activity is about to be stopped
(such as when the user navigates to a new Place). In addition, the
ActivityManager warns the user before the window is about to be closed.
GWT MVP Development with Activities and Places - Google Web Toolkit - Google Code - 2 views
-
-
A place in GWT 2.1 is a Java object representing a particular state of the UI. A Place can be converted to and from a URL history token (see GWT's History object) by defining a PlaceTokenizer for each Place, and the PlaceHistoryHandler automatically updates the browser URL corresponding to each Place in your app.
-
A key concept of MVP development is that a view is defined by an interface.
- ...23 more annotations...
Large scale application development and MVP - Part II - 0 views
-
segment the code that declares the UI from the code that drives the UI.
-
we want the our ContactsPresenter to implement a Presenter interface that allows our ContactsView to callback into the presenter when it receives a click, select or other event. The Presenter interface defines the following: public interface Presenter<T> { void onAddButtonClicked(); void onDeleteButtonClicked(); void onItemClicked(T clickedItem); void onItemSelected(T selectedItem); }
-
The first part of wiring everything up is to have our ContactsPresenter implement the Presenter interface, and then register itself with the underlying view. To register itself, we'll need our ContactsView to expose a setPresenter() method: private Presenter<T> presenter; public void setPresenter(Presenter<T> presenter) { this.presenter = presenter; }
- ...8 more annotations...
1 - 6 of 6
Showing 20▼ items per page