private String maybeGoTo(Place newPlace) { PlaceChangeRequestEvent willChange = new PlaceChangeRequestEvent(newPlace); eventBus.fireEvent(willChange); String warning = willChange.getWarning(); return warning; } }
/** * Reject the place change if the current activity is not willing to stop. * * @see com.google.gwt.place.shared.PlaceChangeRequestEvent.Handler#onPlaceChangeRequest(PlaceChangeRequestEvent) */ public void onPlaceChangeRequest(PlaceChangeRequestEvent event) { event.setWarning(currentActivity.mayStop()); }
PlaceChangeRequestEvent willChange = new PlaceChangeRequestEvent(newPlace); eventBus.fireEvent(willChange); String warning = willChange.getWarning(); return warning;
private String maybeGoTo(Place newPlace) { PlaceChangeRequestEvent willChange = new PlaceChangeRequestEvent(newPlace); eventBus.fireEvent(willChange); String warning = willChange.getWarning(); return warning; } }
/** * Reject the place change if the current activity is not willing to stop. * * @see com.google.gwt.place.shared.PlaceChangeRequestEvent.Handler#onPlaceChangeRequest(PlaceChangeRequestEvent) */ public void onPlaceChangeRequest(PlaceChangeRequestEvent event) { event.setWarning(currentActivity.mayStop()); }
private String maybeGoTo(Place newPlace) { PlaceChangeRequestEvent willChange = new PlaceChangeRequestEvent(newPlace); eventBus.fireEvent(willChange); String warning = willChange.getWarning(); return warning; } }
public void onPlaceChangeRequest(PlaceChangeRequestEvent event) { if (!currentActivity.equals(NULL_ACTIVITY)) { event.setWarning(currentActivity.mayStop()); } }
@Override public void goTo(final Place newPlace) { if (this.getWhere().equals(newPlace)) { return; } PlaceChangeRequestEvent willChange = new PlaceChangeRequestEvent(newPlace); EventBus.get().fireEvent(willChange); String warning = willChange.getWarning(); if (warning == null || Window.confirm(warning)) { this.doGo(newPlace); } else { this.goTo(this.getWhere()); } }
/** * Reject the place change if the current activity is not willing to stop. * * @see com.google.gwt.place.shared.PlaceChangeRequestEvent.Handler#onPlaceChangeRequest(PlaceChangeRequestEvent) */ public void onPlaceChangeRequest(PlaceChangeRequestEvent event) { event.setWarning(currentActivity.mayStop()); }
@Override public void goTo(final Place newPlace) { if (this.getWhere().equals(newPlace)) { return; } PlaceChangeRequestEvent willChange = new PlaceChangeRequestEvent(newPlace); EventBus.get().fireEvent(willChange); String warning = willChange.getWarning(); if (warning == null || Window.confirm(warning)) { this.doGo(newPlace); } else { this.goTo(this.getWhere()); } }
public void onPlaceChangeRequest(PlaceChangeRequestEvent event) { if (!currentActivity.equals(NULL_ACTIVITY)) { event.setWarning(currentActivity.mayStop()); } }