Re: MVP pattern & problem with singletons views
Hi Thomas!!
Thanks for the info. I fixed my code.
Juan
On 12 jun, 15:47, Thomas Broyer <t.bro...@gmail.com> wrote:
> 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 (seehttp://code.google.com/webtoolkit/articles/mvp-architecture-2.htmlandhttp://code.google.com/webtoolkit/doc/latest/DevGuideMvpActivitiesAnd...):
> 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 post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home