I'd like to suggest a PlaceController Enhancement with the Delegate 
overriding so I can have the place controller check if the warning has been 
cleared.

I'd like to build my own popup dialog as the delegate which is non 
blocking, and goto the newPlace when my saving data is done, instead of 
asking for the person to cancel an go do the saving manually. Basically, 
I'd like to tell the Place Controller via event that its ok now, or easier 
would be to say, check the warning message again, b/c it should be cleared. 

Currently the confirmation dialog is blocking and returns boolean in the 
place controller and I'd like to control the maybeGotoPlace with events. 

Thoughts?


public class PlaceController {
//...
  public void goTo(Place newPlace) {
    log().fine("goTo: " + newPlace);

    if (getWhere().equals(newPlace)) {
      log().fine("Asked to return to the same place: " + newPlace);
      return;
    }

    // NOTE: delegate.confirm(warning) is blocking until dialog comes back 
true|false
    String warning = maybeGoTo(newPlace);
    if (warning == null || delegate.confirm(warning)) {
      where = newPlace;
      eventBus.fireEvent(new PlaceChangeEvent(newPlace));
    }
  }
//...
}

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/wewzqBEglK8J.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to