Package com.google.gwt.place.shared
Class PlaceChangeRequestEvent
java.lang.Object
com.google.web.bindery.event.shared.Event<PlaceChangeRequestEvent.Handler>
com.google.gwt.event.shared.GwtEvent<PlaceChangeRequestEvent.Handler>
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 Class SummaryNested ClassesModifier and TypeClassDescriptionstatic interfaceImplemented by handlers of PlaceChangeRequestEvent.Nested classes/interfaces inherited from class com.google.gwt.event.shared.GwtEventGwtEvent.Type<H>
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final GwtEvent.Type<PlaceChangeRequestEvent.Handler> A singleton instance of Type<Handler>.
- 
Constructor SummaryConstructorsConstructorDescriptionPlaceChangeRequestEvent(Place newPlace) Constructs a PlaceChangeRequestEvent for the givenPlace.
- 
Method SummaryModifier and TypeMethodDescriptionprotected voiddispatch(PlaceChangeRequestEvent.Handler handler) Should only be called byHandlerManager.Returns theEvent.Typeused to register this event, allowing anEventBusto find handlers of the appropriate class.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.voidsetWarning(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.GwtEventassertLive, getSource, isLive, kill, reviveMethods inherited from class com.google.web.bindery.event.shared.EventsetSource, toDebugString, toString
- 
Field Details- 
TYPEA singleton instance of Type<Handler>.
 
- 
- 
Constructor Details
- 
Method Details- 
getAssociatedTypeDescription copied from class:EventReturns theEvent.Typeused to register this event, allowing anEventBusto find handlers of the appropriate class.- Specified by:
- getAssociatedTypein class- GwtEvent<PlaceChangeRequestEvent.Handler>
- Returns:
- the type
 
- 
getNewPlaceReturns the place we may navigate to, or null on window close.- Returns:
- a Placeinstance
 
- 
getWarningReturns the warning message to show the user before allowing the place change, or null if none has been set.- Returns:
- the warning message as a String
- See Also:
 
- 
setWarningSet 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. - Parameters:
- warning- the warning message as a String
- See Also:
 
 
-