Sha256: 1dab1acbd5412091edcc29d55872852a446d3862878b5d72e81f82d2cb8e8424
Contents?: true
Size: 1.74 KB
Versions: 1
Compression:
Stored size: 1.74 KB
Contents
package <%= base_package %>; import com.google.gwt.core.client.EntryPoint; import com.google.gwt.core.client.GWT; <% if options[:gin] -%> import com.google.gwt.inject.client.GinModules; import com.google.gwt.inject.client.Ginjector; <% end -%> <% if options[:place] -%> import com.google.gwt.place.shared.PlaceHistoryHandler; <% end -%> import <%= gwt_rails_package %>.Application; import <%= gwt_rails_package %>.dispatchers.DefaultDispatcherSingleton; import org.fusesource.restygwt.client.Defaults; /** * Entry point classes define <code>onModuleLoad()</code>. */ public class <%= application_class_name %>EntryPoint implements EntryPoint { <% if options[:gin] -%> @GinModules(<%= application_class_name %>GinModule.class) static public interface <%= application_class_name %>Ginjector extends Ginjector { <% if options[:place] -%> PlaceHistoryHandler getPlaceHistoryHandler(); <% end -%> Application getApplication(); } <% end -%> /** * This is the entry point method. */ public void onModuleLoad() { Defaults.setServiceRoot(GWT.getModuleBaseURL().replaceFirst("[a-zA-Z0-9_]+/$", "")); Defaults.setDispatcher(DefaultDispatcherSingleton.INSTANCE); GWT.log("base url for restservices: " + Defaults.getServiceRoot()); <% if options[:gin] -%> final <%= application_class_name %>Ginjector injector = GWT.create(<%= application_class_name %>Ginjector.class); // setup display injector.getApplication().run(); <% if options[:place] -%> // Goes to the place represented on URL else default place injector.getPlaceHistoryHandler().handleCurrentHistory(); <% end -%> <% else -%> new <%= application_class_name %>Application().run(); <% end -%> } }
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
gwt-run-0.1.0 | lib/maven/gwt/templates/EntryPoint.java~ |