Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7434321
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T09:49:02+00:00 2026-05-29T09:49:02+00:00

I´m trying to do my first steps with GWT/GIN. I´ve downloaded the hellomvp example

  • 0

I´m trying to do my first steps with GWT/GIN.

I´ve downloaded the hellomvp example from google and followed this tutorial to get started with gin.

My problem is about this line in the configure-method of the HelloGinModule-class:

bind(ActivityMapper.class).to(AppActivityMapper.class).in(Singleton.class);

In my point of view it should bind my class “AppActivityMapper” as the active ActityManager.
But in fact the class constructor (or any method of the class) is never called, so the fired events are not caught.

The class AppActivityMapper looks like this:

public class AppActivityMapper implements ActivityMapper {

       Provider<HelloActivity> helloActivityProvider;
       Provider<GoodbyeActivity> goodbyeActivityProvider;

       @Inject
       public AppActivityMapper(final Provider<HelloActivity> helloActivityProvider, final Provider<GoodbyeActivity> goodbyeActivityProvider) {
           this.helloActivityProvider = helloActivityProvider;
           this.goodbyeActivityProvider = goodbyeActivityProvider;
       }


       @Override
       public Activity getActivity(Place place) {
           if (place instanceof HelloPlace) {
               return helloActivityProvider.get();
           } else if (place instanceof GoodbyePlace) {
               return goodbyeActivityProvider.get();            
           }

           return null;
       }
}

In my example this code from my View-Class is called after clicking on a link:

presenter.goTo(new GoodbyePlace(name)); 

The event is fired to the event bus. But nothing happens.

Thanks in advance

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T09:49:03+00:00Added an answer on May 29, 2026 at 9:49 am

    You have defined an activity mapper somewhere in you GIN. But activity mapper have to be used in activity manager. Where do you create activity manager which will use your AppActivityMapper?
    UPDATE:

    The most logical thing is to keep activity manager out of the gin. E.g. in your ginjector you will have a method:

    interface MyInjector extends Ginjector {
       ... //other methods
    
      ActivityMapper  getActivityMapper();
    
    }
    

    Than , when you create ginjector instance, you can create a manager and put correct activity mapper into it. for example:

     MyInjector  injector = GWT.create(MyInjector.class);
       ActivityManager manager = new ActivityManager(injector.getActivityMapper(), injector.getEventBus());
    

    If you have multiple managers and mappers, may be it will be better to extend ActivityManager class (so you can inject stuff into its constructor). Another solution is to use @Provides to initialize ActivityManager.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to setup SSL to my web app and followed tutorial (http://techtracer.com/2007/09/12/setting-up-ssl-on-tomcat-in-3-easy-steps/),
First steps in FreeBSD: trying to run my installation script. Fast help needed: #
Making my first steps with NHibernate, I'm trying to have it creating my Tables
this is my first time trying to use document classes in AS3 and im
I've just started with PBE. Now trying to follow few first tutorials. Have problem
I am trying to make my first AJAX Control and I get error. I
I'm trying to learn lisp and as i'm making my first steps i got
I'm learning Haskell, and these are my first steps in trying to understand the
I am trying to get a list of available numbers from the following json
I am taking my first steps in XML-schema land, using XSD, and I'm trying

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.