Thursday, February 23, 2012

Re: Issue: Multiple Presenter Instances

When you attach a new presenter to a view, it should *replace* the previous one, so you have to find a way to do this.

if you follow the "part 2" article from the docs, the one with a Presenter interface in addition to the Display interface, then it's straightforward.
If you don't, but you're using Activities (and your activity is your presenter), then you'll have a clear onStop() hook signaling your presenter when to un-register its event handlers.
Otherwise, you'll have to come up with something similar.

I can't express how strongly I'd suggest you use Places and Activities for navigation (rather than History and tokens), and the "part 2" approach for binding your presenter(s) to the view (call setPresenter on the view from your activity's start() method, and possibly call setPresenter(null) from onStop and onCancel)

--
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/-/YjeEz2_3W9MJ.
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


Real Estate