Example usage for com.google.gwt.activity.shared Activity mayStop

List of usage examples for com.google.gwt.activity.shared Activity mayStop

Introduction

In this page you can find the example usage for com.google.gwt.activity.shared Activity mayStop.

Prototype

String mayStop();

Source Link

Document

Called when the user is trying to navigate away from this activity.

Usage

From source file:org.drools.guvnor.client.common.content.multi.MultiActivityManager.java

License:Apache License

public void onClosePlace(@Observes ClosePlaceEvent closePlaceEvent) {
    final Activity activity = activeActivities.get(closePlaceEvent.getPlace());
    if (activity.mayStop() == null) {
        activity.onStop();/*from  w w w  .ja  va  2 s .c  o m*/
        activeActivities.remove(closePlaceEvent.getPlace());
        tabbedPanel.close(closePlaceEvent.getPlace());
    }
}