Hi! I have simple question about Places & Activities. I'd like to know how 
asynchronous calls (through RequestFactory) should be made, what's the best 
practice.

1) Is good to control loading from the view? I mean passing receiver from 
the view to the activity to be able to act on onSuccess?

public interface MyView extends IsWidget {
void setPresenter(Presenter presenter);

public interface Presenter {
void goTo(Place place);
void fetchSomeData(Receiver<List<SomeDataProxy>> receiver);
void fetchSomeDataMore(SomeDataProxy someData, 
Receiver<List<SomeDataMoreProxy>> receiver);
}
}

2) Or should I go without passing receiver and define two-way 
communication? (IMO this approach's worse than 1st one)

public interface MyView extends IsWidget {
void setPresenter(Presenter presenter);
void setSomeData(List<SomeDataProxy> someData);
void setSomeDataMore(List<SomeDataMoreProxy> someDataMore);

public interface Presenter {
void goTo(Place place);
void fetchSomeData();
void fetchSomeDataMore(SomeDataProxy someData);
}
}

3) Or I'm completelly wrong and this kind of stuff should be done 
differently? :-)

Thanks for your ideas, how you controll your asynchronous data loading.

Regards,
Zdenek

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