On 29 oct, 06:52, DrG <[email protected]> wrote: > Hi, > > I have been reading the excellent article > at:http://code.google.com/webtoolkit/doc/latest/DevGuideMvpActivitiesAnd... > > And love the new built in objects that facilitate the MVP design > paradigm. My initial thought is great but how does this system cope > with Nested Views or Dock Panel style layouts where various elements > can be clicked and the widget that changes isn't necessarily always > the center one? > > Looking at the example code given for HelloMVP it looks like when you > go to a new Place when the Activity is started by calling the start > method a widget is passed in that is the containerWidget or host for > that presenter: > > @Override > public void start(AcceptsOneWidget containerWidget, EventBus > eventBus) { > GoodbyeView goodbyeView = clientFactory.getGoodbyeView(); > goodbyeView.setName(name); > containerWidget.setWidget(goodbyeView.asWidget()); > } > > Looking at the setup code from the onModuleLoad, a root SimplePanel is > added to the activity manager: > > activityManager.setDisplay(appWidget); > > This widget is then passed to the start method each time a new place > is revealed. Thus causing a screen refresh? each time a new place is > revealed. > > How would you handle a scenario that has a Left hand menu (like gmail) > and a main container. Where clicking options in the LHS initiates a > new widget to be displayed in the center. Using the current logic it > looks like the whole screen is refreshed to show the newly selected > menu option and the center widget. Perhaps it does, and perhaps this > is ok, but it sounds hacky.
In addition to David's response, see http://tbroyer.posterous.com/gwt-21-activities-nesting-yagni -- 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.
