There is another thread on the GWT contributors group about this topic. http://groups.google.com/group/google-web-toolkit-contributors/browse_thread/thread/732e66a858a8ef0b/38a3f36ffc1767a0
-Richard On Oct 21, 5:59 am, Sebastian Beigel <[email protected]> wrote: > Thank you Thomas, > > that's what I was thinking -- and I'm playing with a custom code > generator already :) > > Just wondering what "they" mean with the GIN comments in the doc/code... > > In my pre-2.1 homegrown framework I use a code-generated presenter > config based on a Ginjector (declaring all the getFooPresenter() > methods annotated with location (place) and security informations). My > presenters were singletons and were "started" with the actual Place. > That way I could use GIN to (constructor) inject all my dependencies. > I'm not sure if I like this 2.1-design (constructing activities with > the actual place) which means I cannot use GIN to construct them. > Maybe I make my activities extends some AbstractBaseActivity > containing a setPlace(P place) method which is called in the > ActivityMapper... > > Sebastian > > > > > > > > On Wed, Oct 20, 2010 at 11:22 PM, Thomas Broyer <[email protected]> wrote: > > > On 20 oct, 11:42, Sebastian Beigel <[email protected]> wrote: > >> Hi, > > >> I'm looking at 2.1 (RC1) for the first time right now and I try to > >> refactor the hellomvp sample to use GIN. > > >> Unfortunately, I have some problems with the places -> activities > >> mapping. The doc says "A better way to implement the chain of nested > >> ifs would be with a GIN module." and the code is commented "Map each > >> Place to its corresponding Activity. This would be a great use for > >> GIN.". > > >> I agree, but I don't really know how to do this mapping :) Has anyone > >> refactored this code to use GIN? > > > You just can't actually. What could work is using a Ginjector as the > > factory of a PlaceHistoryMapperWithFactory, but for ActivityMapper > > this is not possible (it could be by adding a code generator using a > > factory of activity factories, similar to the factory of place > > tokenizers (which are kind of factories for places) for > > PlaceHistoryMapperWithFactory). > > I wrote an code generator for ActivityMapper some time ago <http://gwt- > > code-reviews.appspot.com/845802/show> it won't do what you're asking > > for but could probably be used as a basis for it. But you'd first have > > to decide how to model a "factory of activities" that would be > > returned by your "Ginjector as a factory for > > ActivityMapperWithFactory". > > > -- > > 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 > > athttp://groups.google.com/group/google-web-toolkit?hl=en. -- 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.
