|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.customware.gwt.presenter.client.place.Place
net.customware.gwt.presenter.client.place.PresenterPlace<T>
public abstract class PresenterPlace<T extends Presenter>
This is a subclass of Place with some helper values for working with
Presenters.
| Constructor Summary | |
|---|---|
PresenterPlace()
|
|
| Method Summary | |
|---|---|
void |
addHandlers(EventBus eventBus)
This method is called if the place should register itself with the event bus. |
abstract T |
getPresenter()
|
static Presenter |
getPresenter(Place place)
Returns the Presenter for the provided Place if the place
is an instance of PresenterPlace and the contained
Presenter is an instance of the presenterClass. |
static WidgetPresenter<?> |
getWidgetPresenter(Place place)
|
protected void |
handleRequest(PlaceRequest request)
Reveals the display. |
protected abstract void |
preparePresenter(PlaceRequest request,
T presenter)
This method is called on matching place requests before the presenter is revealed. |
protected PlaceRequest |
prepareRequest(PlaceRequest request)
Returns the request with any extra values relevant to the current place initialised. |
protected abstract PlaceRequest |
prepareRequest(PlaceRequest request,
T presenter)
This method is called when creating a PlaceRequest for this
place. |
void |
removeHandlers(EventBus eventBus)
This method is called when it should deregister any event handlers that were registered with the Place.addHandlers(net.customware.gwt.presenter.client.EventBus) method. |
void |
reveal()
Calls the Presenter.revealDisplay() method for the place's
presenter. |
| Methods inherited from class net.customware.gwt.presenter.client.place.Place |
|---|
createRequest, equals, getName, hashCode, matchesRequest, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public PresenterPlace()
| Method Detail |
|---|
public abstract T getPresenter()
public void reveal()
Presenter.revealDisplay() method for the place's
presenter.
reveal in class Placeprotected void handleRequest(PlaceRequest request)
handleRequest in class Placerequest - The place request.
protected abstract void preparePresenter(PlaceRequest request,
T presenter)
request - The request.presenter - The presenter.protected PlaceRequest prepareRequest(PlaceRequest request)
Placereturn request.with( "name", idValue ).with( "name", "Foo" );
prepareRequest in class Placerequest - The current request object.
protected abstract PlaceRequest prepareRequest(PlaceRequest request,
T presenter)
PlaceRequest for this
place. It should add any state to the request as defined by the current
presenter.
If nothing is to be done, simply return the request
unchanged. Otherwise, call PlaceRequest.with(String, String) to
add parameters. Eg:
return request.with( "id", presenter.getId() );
request - The current request.presenter - The presenter.
public static WidgetPresenter<?> getWidgetPresenter(Place place)
public static Presenter getPresenter(Place place)
Presenter for the provided Place if the place
is an instance of PresenterPlace and the contained
Presenter is an instance of the presenterClass.
If not, null is returned.
place - The place.
Presenter, if appropriate.public void addHandlers(EventBus eventBus)
PlacePlaceManager should
enforce this however, so in general, don't call this method directly.
addHandlers in class PlaceeventBus - The event bus.public void removeHandlers(EventBus eventBus)
PlacePlace.addHandlers(net.customware.gwt.presenter.client.EventBus) method.
removeHandlers in class PlaceeventBus - The event bus.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||