java.lang.Object | ||
↳ | com.google.gwt.event.shared.GwtEvent<H extends com.google.gwt.event.shared.EventHandler> | |
↳ | com.google.gwt.place.shared.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 Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
PlaceChangeRequestEvent.Handler | Implemented by handlers of PlaceChangeRequestEvent. |
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
TYPE | A singleton instance of Type<Handler>. |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Constructs a PlaceChangeRequestEvent for the given
Place . |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Returns the type used to register this event.
| |||||||||||
Returns the place we may navigate to, or null on window close.
| |||||||||||
Returns the warning message to show the user before allowing the place
change, or null if none has been set.
| |||||||||||
Set a message to warn the user that it might be unwise to navigate away
from the current place, e.g.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Should only be called by
HandlerManager . |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class com.google.gwt.event.shared.GwtEvent | |||||||||||
From class
java.lang.Object
|
A singleton instance of Type<Handler>.
Returns the type used to register this event. Used by handler manager to dispatch events to the correct handlers.
Returns the place we may navigate to, or null on window close.
Place
instance
Returns the warning message to show the user before allowing the place change, or null if none has been set.
Set a message to warn the user that it might be unwise to navigate away from the current place, e.g. due to unsaved changes. If the user clicks okay to that message, navigation will be canceled.
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.
warning | the warning message as a String |
---|
Should only be called by HandlerManager
. In other words, do not use
or call.
handler | handler |
---|