Don't forget the onCancel() method too: if your activity starts 
asynchronously, it can be cancelled before you set the view in the 
AcceptsOneWidget passed in argument to the start() method; in this case, 
onCancel() is called rather than onStop().

You'll find out that it's much easier to handle using a "presenter 
interface" to talk from your view back to your presenter (see 
http://code.google.com/webtoolkit/articles/mvp-architecture-2.html and 
http://code.google.com/webtoolkit/doc/latest/DevGuideMvpActivitiesAndPlaces.html
 ): 
all your activity has to do is getView().setPresenter(this) in start(), and 
getView().setPresenter(null) in onStop() and onCancel(). You can use 
@UiHandlers in your view, and if you don't, you don't have to manage "event 
handler's lifecycle" either.

-- 
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/-/FXjTcqOJ0LYJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to