Any progress on this? Did you mange to get it working?

On 11 Des, 17:14, sheamus <[email protected]> wrote:
> Hi, I was able to getActivitiesworking with Gin using the post found
> herehttp://wanderingcanadian.posterous.com/hello-mvp-with-gin
>
> I was able to get this working with one ActivityManager and also got
> RequestFactory working using:
>
> @Provides
> @Singleton
> public FestivalRequestFactory getRequestFactory(EventBus eventBus) {
> final FestivalRequestFactory requestFactory =
> GWT.create(FestivalRequestFactory.class);
> requestFactory.initialize(eventBus);
> return requestFactory;
>
> }
>
> And now I'm trying to usemultipleActivityMapper(s) withmultiple
> ActivityManager(s), eg. each panel uses a different Mapper.
>
> I've tried this code:
>
> bind(ActivityMapper.class).to(WestActivityMapper.class).in(Singleton.class) ;
> bind(ActivityMapper.class).to(CenterActivityMapper.class).in(Singleton.clas 
> s);
>
>         @Provides
>         @Singleton
>         public ActivityManager getActivityManager(ActivityMapper mapper,
> EventBus eventBus) {
>                 ActivityManager activityManager = new ActivityManager(mapper,
> eventBus);
>                 return activityManager;
>         }
>
> but because both bindings are to ActivityMapper it fails with:
>
> 16:01:35.569 [ERROR] [eventismo] Double-bound:
> Key[type=com.google.gwt.activity.shared.ActivityMapper,
> annotation=[none]].
> com.google.gwt.inject.rebind.binding.bindclassbind...@a77b84,com.google.gwt 
> .inject.rebind.binding.bindclassbind...@19e51ea
>
> I've tried subclassing ActivityManager and using @Provides and
> returning the sub-class
> "public CenterActivityManager getCenterActivityManager()"  but this
> failed too..
>
> Any help appreciated, Thanks

-- 
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