PlaceController and Delegate for warning confirmation not quite built to be extensible

72 views
Skip to first unread message

Jared Olhoft

unread,
Nov 7, 2012, 8:41:59 AM11/7/12
to google-we...@googlegroups.com
When using Activities and Places to manage application navigation events I'd like to be able to override the default behavior of the com.google.gwt.place.shared.PlaceController. When an activity responds to the mayStop() call returning a warning message string the com.google.gwt.place.shared.PlaceController.DefaultDelegate uses the Window.confirm(message) call to perform a blocking call to the window's dialog. 

I'd like to be able to modify the behavior by providing my own concrete implementation of Delegate that operates on a callback based MessageBox to display the message to the user. 

The problem here is that I need to subclass the PlaceController to override the goTo(newPlace) method to use a callback based call into the delegate.confirm(warning) (which ideally would become delegate.confirm(warning, callback)). Unfortunately PlaceController has its Delegate declared as private and doesn't expose a getDelegate() method for it. 

Anyone have ideas of how to workaround this? 

Thanks

Thomas Broyer

unread,
Nov 7, 2012, 8:59:27 AM11/7/12
to google-we...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages