4 Replies Latest reply on May 16, 2012 2:45 PM by Jim Brownfield

    "onModuleLoad()" called twice

    Jim Brownfield Newbie

      I apologize if this is answered somewhere, but I've looked all around, and I can't find it anywhere.


      Injection doesn't work in the main class designated with @EntryPoint until you reach the @PostConstruct phase (at least that's what it appears to me) -- you just get nulls for the injected variables.  I've looked at many examples, and it seems that most people put the @PostConstruct on the "onModuleLoad()" method.  When I do that, the "onModuleLoad()" gets called twice.  At first I thought I might need to remove the

      'com.google.gwt.user.User' module, but I wasn't sure of all the implications of doing that, and it looked like other people who posted their code had the

      'com.google.gwt.user.User' module and the @PostConstruct on the "onModuleLoad()".


      What am I doing wrong?