Check out the I/O 2010 "Testing GWT apps" presentation by Daniel
Danilatos.  He makes a case for a "dumb view," where you basically
just define a view listener and put your interesting logic there.
Usually your listener will be your presenter.

So in this case your listener would have onGoodbyeLinkClicked(String).


On Nov 8, 8:43 pm, zixzigma <[email protected]> wrote:
> looking at HellpMVP sample:
>
>         @UiHandler("goodbyeLink")
>         void onClickGoodbye(ClickEvent e) {
>                 presenter.goTo(new GoodbyePlace(name));
>         }
>
> is it a good idea for the View Implementation to have knowledge about
> navigation ?
> using goTo and places ?
>
> wouldnt it have been better if Presenter interface in HelloView
> interface declared a method like:
> void onGoodbyeLinkClicked(name)
> and
> in HelloActivity
>
>         public void onGoodbyeLinkClicked(String name) {
>                 clientFactory.getPlaceController().goTo(new Place(name));
>         }
>
> this way view is more passive, as it doesnt have knowledge about
> navigation and places.
> or i am wrong ?

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
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