The bundle is presenter-agnostic. It only contains application-wide state
and control objects.
I do have two classes of presenters in my application, however. Those that
get passed the ApplicationBundle are page presenters, and control the whole
screen (or at least the central content portion of it anyway). They are
created in response to navigation events. These, in turn, may create
component presenters and pass them specific bits of information, like an
instance of their view that was retrieved from somewhere in the main page
view interface, or a specific implementation of their model interface that
will play well with the rest of the page.
Something like this:
public XxxPagePresenter(ApplicationBundle bundle, XxxPageView view) {
this.bundle = bundle;
this.view = view;
this.model = new XxxPageModelImpl();
this.yyyComponentPresenter1 = new
YyyComponentPresenter(model.getYyyComponentModel(),
view.getYyyComponentView());
...
}
-Ben
--
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/-/aZpqp1HwcwwJ.
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.