|
GWT 2.1.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.google.gwt.event.shared.GwtEvent<PlaceChangeRequestEvent.Handler>
com.google.gwt.place.shared.PlaceChangeRequestEvent
public class PlaceChangeRequestEvent
Event thrown when the user may go to a new place in the app, or tries to
leave it. Receivers can call setWarning(String) request that the
user be prompted to confirm the change.
| Nested Class Summary | |
|---|---|
static interface |
PlaceChangeRequestEvent.Handler
Implemented by handlers of PlaceChangeRequestEvent. |
| Nested classes/interfaces inherited from class com.google.gwt.event.shared.GwtEvent |
|---|
GwtEvent.Type<H> |
| Field Summary | |
|---|---|
static GwtEvent.Type<PlaceChangeRequestEvent.Handler> |
TYPE
|
| Constructor Summary | |
|---|---|
PlaceChangeRequestEvent(Place newPlace)
|
|
| Method Summary | |
|---|---|
protected void |
dispatch(PlaceChangeRequestEvent.Handler handler)
Should only be called by HandlerManager. |
GwtEvent.Type<PlaceChangeRequestEvent.Handler> |
getAssociatedType()
Returns the type used to register this event. |
Place |
getNewPlace()
Returns the place we may navigate to, or null on window close. |
java.lang.String |
getWarning()
Returns the warning message to show the user before allowing the place change, or null if none has been set. |
void |
setWarning(java.lang.String warning)
Set a message to warn the user that it might be unwise to navigate away from the current place, e.g. |
| Methods inherited from class com.google.gwt.event.shared.GwtEvent |
|---|
assertLive, getSource, isLive, kill, revive, toDebugString, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final GwtEvent.Type<PlaceChangeRequestEvent.Handler> TYPE
| Constructor Detail |
|---|
public PlaceChangeRequestEvent(Place newPlace)
| Method Detail |
|---|
public GwtEvent.Type<PlaceChangeRequestEvent.Handler> getAssociatedType()
GwtEvent
getAssociatedType in class GwtEvent<PlaceChangeRequestEvent.Handler>public Place getNewPlace()
public java.lang.String getWarning()
public void setWarning(java.lang.String warning)
Calling with a null warning is the same as not calling the method at all -- the user will not be prompted.
Only the first non-null call to setWarning has any effect. That is, once the warning message has been set it cannot be cleared.
protected void dispatch(PlaceChangeRequestEvent.Handler handler)
GwtEventHandlerManager. In other words, do not use
or call.
dispatch in class GwtEvent<PlaceChangeRequestEvent.Handler>handler - handler
|
GWT 2.1.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||