WelcomeTo
WelcomeTo

Reputation: 20581

GWT. Deferred start of application

How to start GWT application after applet has loaded? In other words onModuleLoad method must be started after applet has downloaded.

Upvotes: 0

Views: 102

Answers (2)

Ian Jacobs
Ian Jacobs

Reputation: 5501

Depending on the specifics of your project, one possible option will be to not have your *.nocache.js file loaded into the host page until after your applet loads.

Once your applet loads, inject your tag into the html and (i think) it will kick off.

Alternatively you can edit the nocache.js file to not start loading the gwt project on load, instead do it after the applet loads, but that could turn into maintenance headaches if you're not careful.

Upvotes: 1

Konstantin Solomatov
Konstantin Solomatov

Reputation: 10332

AFAIK, it's currently impossible. Application is started when your page is loaded. However, you can do this:

  • On application startup check if the applet is started:
    • If it was started, execute the old app initializer
    • If it wasn't started, add a listener to an applet and when this listener is fired, execute you old app initializer.

Upvotes: 1

Related Questions