gwtbootstrappinggwtpgwt-platform

GWTP Bootstraper doesn't work


I've followed instruction from here. But unfortunately it doesn't work at all.

According to documentation I should:

  1. Implement Bootstrapper interface.
  2. Write implementation of method void onBootstrap().
  3. Register this implementation in **.gwt.xml file.

Which I've done.

Here are my classes:

package pl.daniel.cms.client.gin;

import com.google.gwt.core.shared.GWT;
import com.gwtplatform.mvp.client.Bootstrapper;

public class MyBootstrapper implements Bootstrapper {

    @Override
    public void onBootstrap() {
        GWT.log("Bootstraper Test");
    }
}

<set-configuration-property name="gwtp.bootstrapper" value="pl.daniel.cms.client.gin.MyBootstrapper"/>

But it doesn't work.

I use <gwtp.version>1.5.2</gwtp.version>


Solution

  • Actually it works. The bootstrapper will be, well, bootstrapped (if you put a breakpoint on your GWT.log statement you'll see it executed + some additional magic there)

    Also, you're not revealing the place after custom bootstrapping. Please change it to

    @Inject
    PlaceManager placeManager;
    @Override
    public void onBootstrap() {
        logger.fine("Hi there");
        placeManager.revealPlace(new PlaceRequest.Builder().nameToken(NameTokens.HOME).build());
    }
    

    To see at least something on the screen